Fixed stairs
This commit is contained in:
@@ -19,10 +19,11 @@
|
||||
package appeng.core;
|
||||
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.FMLRelaunchLog;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import net.minecraft.util.BlockPos;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.tile.AEBaseTile;
|
||||
@@ -31,8 +32,8 @@ import appeng.util.Platform;
|
||||
|
||||
public final class AELog
|
||||
{
|
||||
|
||||
public static final FMLRelaunchLog INSTANCE = FMLRelaunchLog.log;
|
||||
private static final Logger SERVER = LogManager.getFormatterLogger( "AE2:S" );
|
||||
private static final Logger CLIENT = LogManager.getFormatterLogger( "AE2:C" );
|
||||
|
||||
private AELog()
|
||||
{
|
||||
@@ -47,7 +48,14 @@ public final class AELog
|
||||
{
|
||||
if( AEConfig.instance == null || AEConfig.instance.isFeatureEnabled( AEFeature.Logging ) )
|
||||
{
|
||||
FMLRelaunchLog.log( "AE2:" + ( Platform.isServer() ? "S" : "C" ), level, format, data );
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
SERVER.log( level, format, data );
|
||||
}
|
||||
else
|
||||
{
|
||||
CLIENT.log( level, format, data );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,6 @@ 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 =
|
||||
@@ -162,6 +161,7 @@ public final class AppEng
|
||||
|
||||
Registration.INSTANCE.initialize( event );
|
||||
IntegrationRegistry.INSTANCE.init();
|
||||
CommonHelper.proxy.init();
|
||||
|
||||
AELog.info( "Initialization ( ended after " + star.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
|
||||
}
|
||||
@@ -183,6 +183,12 @@ public final class AppEng
|
||||
NetworkHandler.instance = new NetworkHandler( "AE2" );
|
||||
|
||||
AELog.info( "Post Initialization ( ended after " + star.elapsed( TimeUnit.MILLISECONDS ) + "ms )" );
|
||||
|
||||
// System.out.println( "REGISTRY:" );
|
||||
// for( Block block : GameData.getBlockRegistry().typeSafeIterable() )
|
||||
// {
|
||||
// System.out.println( "block = " + block + ", " + block.getUnlocalizedName() + ", " + block.getLocalizedName() );
|
||||
// }
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
|
||||
@@ -24,6 +24,7 @@ import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
@@ -47,7 +48,7 @@ public abstract class CommonHelper
|
||||
|
||||
public abstract World getWorld();
|
||||
|
||||
public abstract void bindTileEntitySpecialRenderer( Class tile, AEBaseBlock blk );
|
||||
public abstract void bindTileEntitySpecialRenderer( Class <? extends TileEntity> tile, AEBaseBlock blk );
|
||||
|
||||
public abstract List<EntityPlayer> getPlayers();
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ import appeng.core.localization.GuiText;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
import appeng.core.stats.PlayerStatsRegistration;
|
||||
import appeng.hooks.TickHandler;
|
||||
import appeng.items.materials.ItemMultiMaterial;
|
||||
import appeng.items.materials.MultiItem;
|
||||
import appeng.me.cache.CraftingGridCache;
|
||||
import appeng.me.cache.EnergyGridCache;
|
||||
import appeng.me.cache.GridStorageCache;
|
||||
@@ -222,7 +222,7 @@ public final class Registration
|
||||
final IRegistryContainer registries = api.registries();
|
||||
|
||||
// Perform ore camouflage!
|
||||
ItemMultiMaterial.instance.makeUnique();
|
||||
MultiItem.instance.makeUnique();
|
||||
|
||||
final Runnable recipeLoader = new RecipeLoader( this.recipeHandler );
|
||||
recipeLoader.run();
|
||||
|
||||
@@ -53,20 +53,20 @@ import appeng.block.networking.BlockEnergyCell;
|
||||
import appeng.block.networking.BlockWireless;
|
||||
import appeng.block.qnb.BlockQuantumLinkChamber;
|
||||
import appeng.block.qnb.BlockQuantumRing;
|
||||
import appeng.block.solids.BlockFluix;
|
||||
import appeng.block.solids.BlockQuartz;
|
||||
import appeng.block.solids.BlockQuartzChiseled;
|
||||
import appeng.block.solids.BlockQuartzGlass;
|
||||
import appeng.block.solids.BlockQuartzLamp;
|
||||
import appeng.block.solids.BlockQuartzPillar;
|
||||
import appeng.block.solids.BlockSkyStone;
|
||||
import appeng.block.solids.BlockSkyStone.SkystoneType;
|
||||
import appeng.block.solids.OreQuartz;
|
||||
import appeng.block.solids.OreQuartzCharged;
|
||||
import appeng.decorative.solid.FluixBlock;
|
||||
import appeng.decorative.solid.QuartzBlock;
|
||||
import appeng.decorative.solid.ChiseledQuartzBlock;
|
||||
import appeng.decorative.solid.QuartzGlassBlock;
|
||||
import appeng.decorative.solid.QuartzLampBlock;
|
||||
import appeng.decorative.solid.QuartzPillarBlock;
|
||||
import appeng.decorative.solid.SkyStoneBlock;
|
||||
import appeng.decorative.solid.SkyStoneBlock.SkystoneType;
|
||||
import appeng.decorative.solid.QuartzOreBlock;
|
||||
import appeng.decorative.solid.ChargedQuartzOreBlock;
|
||||
import appeng.block.spatial.BlockMatrixFrame;
|
||||
import appeng.block.spatial.BlockSpatialIOPort;
|
||||
import appeng.block.spatial.BlockSpatialPylon;
|
||||
import appeng.block.stair.BlockStairCommon;
|
||||
import appeng.decorative.stair.BlockStairCommon;
|
||||
import appeng.block.storage.BlockChest;
|
||||
import appeng.block.storage.BlockDrive;
|
||||
import appeng.block.storage.BlockIOPort;
|
||||
@@ -161,20 +161,21 @@ public final class ApiBlocks implements IBlocks
|
||||
|
||||
public ApiBlocks( DefinitionConstructor constructor )
|
||||
{
|
||||
this.quartzOre = constructor.registerBlockDefinition( new OreQuartz() );
|
||||
this.quartzOreCharged = constructor.registerBlockDefinition( new OreQuartzCharged() );
|
||||
// this.quartzOre = new BlockDefinition( "ore.quartz", new OreQuartz() );
|
||||
this.quartzOre = constructor.registerBlockDefinition( new QuartzOreBlock() );
|
||||
this.quartzOreCharged = constructor.registerBlockDefinition( new ChargedQuartzOreBlock() );
|
||||
this.matrixFrame = constructor.registerBlockDefinition( new BlockMatrixFrame() );
|
||||
this.quartz = constructor.registerBlockDefinition( new BlockQuartz() );
|
||||
this.quartzPillar = constructor.registerBlockDefinition( new BlockQuartzPillar() );
|
||||
this.quartzChiseled = constructor.registerBlockDefinition( new BlockQuartzChiseled() );
|
||||
this.quartzGlass = constructor.registerBlockDefinition( new BlockQuartzGlass() );
|
||||
this.quartzVibrantGlass = constructor.registerBlockDefinition( new BlockQuartzLamp() );
|
||||
this.quartz = constructor.registerBlockDefinition( new QuartzBlock() );
|
||||
this.quartzPillar = constructor.registerBlockDefinition( new QuartzPillarBlock() );
|
||||
this.quartzChiseled = constructor.registerBlockDefinition( new ChiseledQuartzBlock() );
|
||||
this.quartzGlass = constructor.registerBlockDefinition( new QuartzGlassBlock() );
|
||||
this.quartzVibrantGlass = constructor.registerBlockDefinition( new QuartzLampBlock() );
|
||||
this.quartzTorch = constructor.registerBlockDefinition( new BlockQuartzTorch() );
|
||||
this.fluix = constructor.registerBlockDefinition( new BlockFluix() );
|
||||
this.skyStone_stone = constructor.registerBlockDefinition( new BlockSkyStone( SkystoneType.stone ) );
|
||||
this.skyStone_block = constructor.registerBlockDefinition( new BlockSkyStone( SkystoneType.block ) );
|
||||
this.skyStone_brick = constructor.registerBlockDefinition( new BlockSkyStone( SkystoneType.brick ) );
|
||||
this.skyStone_smallbrick = constructor.registerBlockDefinition( new BlockSkyStone( SkystoneType.smallbrick ) );
|
||||
this.fluix = constructor.registerBlockDefinition( new FluixBlock() );
|
||||
this.skyStone_stone = constructor.registerBlockDefinition( new SkyStoneBlock( SkystoneType.STONE ) );
|
||||
this.skyStone_block = constructor.registerBlockDefinition( new SkyStoneBlock( SkystoneType.BLOCK ) );
|
||||
this.skyStone_brick = constructor.registerBlockDefinition( new SkyStoneBlock( SkystoneType.BRICK ) );
|
||||
this.skyStone_smallbrick = constructor.registerBlockDefinition( new SkyStoneBlock( SkystoneType.SMALL_BRICK ) );
|
||||
this.skyChest = constructor.registerBlockDefinition( new BlockSkyChest( SkyChestType.STONE ) );
|
||||
this.skyChestBlock = constructor.registerBlockDefinition( new BlockSkyChest( SkyChestType.BLOCK ) );
|
||||
this.skyCompass = constructor.registerBlockDefinition( new BlockSkyCompass() );
|
||||
@@ -214,7 +215,7 @@ 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" );
|
||||
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.brick.small" );
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.core.api.definitions;
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
import appeng.api.definitions.IMaterials;
|
||||
import appeng.core.features.DamagedItemDefinition;
|
||||
import appeng.items.materials.ItemMultiMaterial;
|
||||
import appeng.items.materials.MultiItem;
|
||||
import appeng.items.materials.MaterialType;
|
||||
|
||||
|
||||
@@ -93,7 +93,7 @@ public final class ApiMaterials implements IMaterials
|
||||
|
||||
private final IItemDefinition woodenGear;
|
||||
|
||||
private final IItemDefinition wireless;
|
||||
private final IItemDefinition wirelessReceiver;
|
||||
private final IItemDefinition wirelessBooster;
|
||||
|
||||
private final IItemDefinition annihilationCore;
|
||||
@@ -105,80 +105,79 @@ public final class ApiMaterials implements IMaterials
|
||||
|
||||
public ApiMaterials( DefinitionConstructor constructor )
|
||||
{
|
||||
final ItemMultiMaterial itemMultiMaterial = new ItemMultiMaterial();
|
||||
constructor.registerItemDefinition( itemMultiMaterial );
|
||||
final MultiItem materials = new MultiItem();
|
||||
constructor.registerItemDefinition( materials );
|
||||
|
||||
this.cell2SpatialPart = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Cell2SpatialPart ) );
|
||||
this.cell16SpatialPart = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Cell16SpatialPart ) );
|
||||
this.cell128SpatialPart = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Cell128SpatialPart ) );
|
||||
this.cell2SpatialPart = new DamagedItemDefinition( "material.cell.spatial.2", materials.createMaterial( MaterialType.Cell2SpatialPart ) );
|
||||
this.cell16SpatialPart = new DamagedItemDefinition( "material.cell.spatial.16", materials.createMaterial( MaterialType.Cell16SpatialPart ) );
|
||||
this.cell128SpatialPart = new DamagedItemDefinition( "material.cell.spatial.128", materials.createMaterial( MaterialType.Cell128SpatialPart ) );
|
||||
|
||||
this.silicon = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Silicon ) );
|
||||
this.skyDust = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.SkyDust ) );
|
||||
this.silicon = new DamagedItemDefinition( "material.silicon", materials.createMaterial( MaterialType.Silicon ) );
|
||||
this.skyDust = new DamagedItemDefinition( "material.dust.skystone", materials.createMaterial( MaterialType.SkyDust ) );
|
||||
|
||||
this.calcProcessorPress = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CalcProcessorPress ) );
|
||||
this.engProcessorPress = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.EngProcessorPress ) );
|
||||
this.logicProcessorPress = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.LogicProcessorPress ) );
|
||||
this.calcProcessorPress = new DamagedItemDefinition( "material.press.processor.calculation", materials.createMaterial( MaterialType.CalcProcessorPress ) );
|
||||
this.engProcessorPress = new DamagedItemDefinition( "material.press.processor.engineering", materials.createMaterial( MaterialType.EngProcessorPress ) );
|
||||
this.logicProcessorPress = new DamagedItemDefinition( "material.press.processor.logic", materials.createMaterial( MaterialType.LogicProcessorPress ) );
|
||||
this.siliconPress = new DamagedItemDefinition( "material.press.silicon", materials.createMaterial( MaterialType.SiliconPress ) );
|
||||
this.namePress = new DamagedItemDefinition( "material.press.name", materials.createMaterial( MaterialType.NamePress ) );
|
||||
|
||||
this.calcProcessorPrint = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CalcProcessorPrint ) );
|
||||
this.engProcessorPrint = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.EngProcessorPrint ) );
|
||||
this.logicProcessorPrint = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.LogicProcessorPrint ) );
|
||||
this.calcProcessorPrint = new DamagedItemDefinition( "material.print.processor.calculation", materials.createMaterial( MaterialType.CalcProcessorPrint ) );
|
||||
this.engProcessorPrint = new DamagedItemDefinition( "material.print.processor.engineering", materials.createMaterial( MaterialType.EngProcessorPrint ) );
|
||||
this.logicProcessorPrint = new DamagedItemDefinition( "material.print.processor.logic", materials.createMaterial( MaterialType.LogicProcessorPrint ) );
|
||||
this.siliconPrint = new DamagedItemDefinition( "material.print.silicon", materials.createMaterial( MaterialType.SiliconPrint ) );
|
||||
|
||||
this.siliconPress = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.SiliconPress ) );
|
||||
this.siliconPrint = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.SiliconPrint ) );
|
||||
|
||||
this.namePress = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.NamePress ) );
|
||||
this.logicProcessor = new DamagedItemDefinition( "material.processor.logic", materials.createMaterial( MaterialType.LogicProcessor ) );
|
||||
this.calcProcessor = new DamagedItemDefinition( "material.processor.calculation", materials.createMaterial( MaterialType.CalcProcessor ) );
|
||||
this.engProcessor = new DamagedItemDefinition( "material.processor.engineering", materials.createMaterial( MaterialType.EngProcessor ) );
|
||||
|
||||
this.logicProcessor = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.LogicProcessor ) );
|
||||
this.calcProcessor = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CalcProcessor ) );
|
||||
this.engProcessor = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.EngProcessor ) );
|
||||
this.basicCard = new DamagedItemDefinition( "material.card.basic", materials.createMaterial( MaterialType.BasicCard ) );
|
||||
this.advCard = new DamagedItemDefinition( "material.card.advanced", materials.createMaterial( MaterialType.AdvCard ) );
|
||||
|
||||
this.basicCard = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.BasicCard ) );
|
||||
this.advCard = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.AdvCard ) );
|
||||
this.purifiedCertusQuartzCrystal = new DamagedItemDefinition( "material.crystal.quartz.certus.purified", materials.createMaterial( MaterialType.PurifiedCertusQuartzCrystal ) );
|
||||
this.purifiedNetherQuartzCrystal = new DamagedItemDefinition( "material.crystal.quartz.nether.purified", materials.createMaterial( MaterialType.PurifiedNetherQuartzCrystal ) );
|
||||
this.purifiedFluixCrystal = new DamagedItemDefinition( "material.crystal.fluix.purified", materials.createMaterial( MaterialType.PurifiedFluixCrystal ) );
|
||||
|
||||
this.purifiedCertusQuartzCrystal = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.PurifiedCertusQuartzCrystal ) );
|
||||
this.purifiedNetherQuartzCrystal = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.PurifiedNetherQuartzCrystal ) );
|
||||
this.purifiedFluixCrystal = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.PurifiedFluixCrystal ) );
|
||||
this.cell1kPart = new DamagedItemDefinition( "material.cell.storage.1k", materials.createMaterial( MaterialType.Cell1kPart ) );
|
||||
this.cell4kPart = new DamagedItemDefinition( "material.cell.storage.4k", materials.createMaterial( MaterialType.Cell4kPart ) );
|
||||
this.cell16kPart = new DamagedItemDefinition( "material.cell.storage.16k", materials.createMaterial( MaterialType.Cell16kPart ) );
|
||||
this.cell64kPart = new DamagedItemDefinition( "material.cell.storage.64k", materials.createMaterial( MaterialType.Cell64kPart ) );
|
||||
this.emptyStorageCell = new DamagedItemDefinition( "material.cell.storage.empty", materials.createMaterial( MaterialType.EmptyStorageCell ) );
|
||||
|
||||
this.cell1kPart = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Cell1kPart ) );
|
||||
this.cell4kPart = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Cell4kPart ) );
|
||||
this.cell16kPart = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Cell16kPart ) );
|
||||
this.cell64kPart = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Cell64kPart ) );
|
||||
this.emptyStorageCell = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.EmptyStorageCell ) );
|
||||
this.cardRedstone = new DamagedItemDefinition( "material.card.redstone", materials.createMaterial( MaterialType.CardRedstone ) );
|
||||
this.cardSpeed = new DamagedItemDefinition( "material.card.acceleration", materials.createMaterial( MaterialType.CardSpeed ) );
|
||||
this.cardCapacity = new DamagedItemDefinition( "material.card.capacity", materials.createMaterial( MaterialType.CardCapacity ) );
|
||||
this.cardFuzzy = new DamagedItemDefinition( "material.card.fuzzy", materials.createMaterial( MaterialType.CardFuzzy ) );
|
||||
this.cardInverter = new DamagedItemDefinition( "material.card.inverter", materials.createMaterial( MaterialType.CardInverter ) );
|
||||
this.cardCrafting = new DamagedItemDefinition( "material.card.crafting", materials.createMaterial( MaterialType.CardCrafting ) );
|
||||
|
||||
this.cardRedstone = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CardRedstone ) );
|
||||
this.cardSpeed = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CardSpeed ) );
|
||||
this.cardCapacity = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CardCapacity ) );
|
||||
this.cardFuzzy = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CardFuzzy ) );
|
||||
this.cardInverter = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CardInverter ) );
|
||||
this.cardCrafting = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CardCrafting ) );
|
||||
this.enderDust = new DamagedItemDefinition( "material.dust.ender", materials.createMaterial( MaterialType.EnderDust ) );
|
||||
this.flour = new DamagedItemDefinition( "material.flour", materials.createMaterial( MaterialType.Flour ) );
|
||||
this.goldDust = new DamagedItemDefinition( "material.dust.gold", materials.createMaterial( MaterialType.GoldDust ) );
|
||||
this.ironDust = new DamagedItemDefinition( "material.dust.iron", materials.createMaterial( MaterialType.IronDust ) );
|
||||
this.fluixDust = new DamagedItemDefinition( "material.dust.fluix", materials.createMaterial( MaterialType.FluixDust ) );
|
||||
this.certusQuartzDust = new DamagedItemDefinition( "material.dust.quartz.certus", materials.createMaterial( MaterialType.CertusQuartzDust ) );
|
||||
this.netherQuartzDust = new DamagedItemDefinition( "material.dust.quartz.nether", materials.createMaterial( MaterialType.NetherQuartzDust ) );
|
||||
|
||||
this.enderDust = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.EnderDust ) );
|
||||
this.flour = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Flour ) );
|
||||
this.goldDust = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.GoldDust ) );
|
||||
this.ironDust = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.IronDust ) );
|
||||
this.fluixDust = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.FluixDust ) );
|
||||
this.certusQuartzDust = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CertusQuartzDust ) );
|
||||
this.netherQuartzDust = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.NetherQuartzDust ) );
|
||||
this.matterBall = new DamagedItemDefinition( "material.ammo.matter_ball", materials.createMaterial( MaterialType.MatterBall ) );
|
||||
this.ironNugget = new DamagedItemDefinition( "material.ammo.nugget.iron", materials.createMaterial( MaterialType.IronNugget ) );
|
||||
|
||||
this.matterBall = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.MatterBall ) );
|
||||
this.ironNugget = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.IronNugget ) );
|
||||
this.certusQuartzCrystal = new DamagedItemDefinition( "material.crystal.quartz.certus", materials.createMaterial( MaterialType.CertusQuartzCrystal ) );
|
||||
this.certusQuartzCrystalCharged = new DamagedItemDefinition( "material.crystal.quartz.certus.charged", materials.createMaterial( MaterialType.CertusQuartzCrystalCharged ) );
|
||||
this.fluixCrystal = new DamagedItemDefinition( "material.crystal.fluix", materials.createMaterial( MaterialType.FluixCrystal ) );
|
||||
this.fluixPearl = new DamagedItemDefinition( "material.pearl.fluix", materials.createMaterial( MaterialType.FluixPearl ) );
|
||||
|
||||
this.certusQuartzCrystal = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CertusQuartzCrystal ) );
|
||||
this.certusQuartzCrystalCharged = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.CertusQuartzCrystalCharged ) );
|
||||
this.fluixCrystal = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.FluixCrystal ) );
|
||||
this.fluixPearl = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.FluixPearl ) );
|
||||
this.woodenGear = new DamagedItemDefinition( "material.gear.wooden", materials.createMaterial( MaterialType.WoodenGear ) );
|
||||
|
||||
this.woodenGear = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.WoodenGear ) );
|
||||
this.wirelessReceiver = new DamagedItemDefinition( "material.wireless.receiver", materials.createMaterial( MaterialType.Wireless ) );
|
||||
this.wirelessBooster = new DamagedItemDefinition( "material.wireless.booster", materials.createMaterial( MaterialType.WirelessBooster ) );
|
||||
|
||||
this.wireless = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Wireless ) );
|
||||
this.wirelessBooster = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.WirelessBooster ) );
|
||||
this.annihilationCore = new DamagedItemDefinition( "material.core.annihilation", materials.createMaterial( MaterialType.AnnihilationCore ) );
|
||||
this.formationCore = new DamagedItemDefinition( "material.core.formation", materials.createMaterial( MaterialType.FormationCore ) );
|
||||
|
||||
this.annihilationCore = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.AnnihilationCore ) );
|
||||
this.formationCore = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.FormationCore ) );
|
||||
|
||||
this.singularity = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.Singularity ) );
|
||||
this.qESingularity = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.QESingularity ) );
|
||||
this.blankPattern = new DamagedItemDefinition( itemMultiMaterial.createMaterial( MaterialType.BlankPattern ) );
|
||||
this.singularity = new DamagedItemDefinition( "material.singularity", materials.createMaterial( MaterialType.Singularity ) );
|
||||
this.qESingularity = new DamagedItemDefinition( "material.singularity.entangled.quantum", materials.createMaterial( MaterialType.QESingularity ) );
|
||||
this.blankPattern = new DamagedItemDefinition( "material.pattern.blank", materials.createMaterial( MaterialType.BlankPattern ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -464,9 +463,9 @@ public final class ApiMaterials implements IMaterials
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition wireless()
|
||||
public IItemDefinition wirelessReceiver()
|
||||
{
|
||||
return this.wireless;
|
||||
return this.wirelessReceiver;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -85,35 +85,35 @@ public final class ApiParts implements IParts
|
||||
// this.lumenCableCovered = Optional.absent(); // has yet to be implemented, no PartType defined for it yet
|
||||
// this.lumenCableGlass = Optional.absent(); // has yet to be implemented, no PartType defined for it yet
|
||||
// this.lumenCableDense = Optional.absent(); // has yet to be implemented, no PartType defined for it yet
|
||||
this.quartzFiber = new DamagedItemDefinition( itemMultiPart.createPart( PartType.QuartzFiber ) );
|
||||
this.toggleBus = new DamagedItemDefinition( itemMultiPart.createPart( PartType.ToggleBus ) );
|
||||
this.invertedToggleBus = new DamagedItemDefinition( itemMultiPart.createPart( PartType.InvertedToggleBus ) );
|
||||
this.storageBus = new DamagedItemDefinition( itemMultiPart.createPart( PartType.StorageBus ) );
|
||||
this.importBus = new DamagedItemDefinition( itemMultiPart.createPart( PartType.ImportBus ) );
|
||||
this.exportBus = new DamagedItemDefinition( itemMultiPart.createPart( PartType.ExportBus ) );
|
||||
this.iface = new DamagedItemDefinition( itemMultiPart.createPart( PartType.Interface ) );
|
||||
this.levelEmitter = new DamagedItemDefinition( itemMultiPart.createPart( PartType.LevelEmitter ) );
|
||||
this.annihilationPlane = new DamagedItemDefinition( itemMultiPart.createPart( PartType.AnnihilationPlane ) );
|
||||
this.identityAnnihilationPlane = new DamagedItemDefinition( itemMultiPart.createPart( PartType.IdentityAnnihilationPlane ) );
|
||||
this.formationPlane = new DamagedItemDefinition( itemMultiPart.createPart( PartType.FormationPlane ) );
|
||||
this.p2PTunnelME = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelME ) );
|
||||
this.p2PTunnelRedstone = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRedstone ) );
|
||||
this.p2PTunnelItems = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelItems ) );
|
||||
this.p2PTunnelLiquids = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelLiquids ) );
|
||||
this.quartzFiber = new DamagedItemDefinition( "part.quartz_fiber", itemMultiPart.createPart( PartType.QuartzFiber ) );
|
||||
this.toggleBus = new DamagedItemDefinition( "part.toggle_bus", itemMultiPart.createPart( PartType.ToggleBus ) );
|
||||
this.invertedToggleBus = new DamagedItemDefinition( "part.toggle_bus.inverted", itemMultiPart.createPart( PartType.InvertedToggleBus ) );
|
||||
this.storageBus = new DamagedItemDefinition( "part.bus.storage", itemMultiPart.createPart( PartType.StorageBus ) );
|
||||
this.importBus = new DamagedItemDefinition( "part.bus.import", itemMultiPart.createPart( PartType.ImportBus ) );
|
||||
this.exportBus = new DamagedItemDefinition( "part.bus.export", itemMultiPart.createPart( PartType.ExportBus ) );
|
||||
this.iface = new DamagedItemDefinition( "part.interface", itemMultiPart.createPart( PartType.Interface ) );
|
||||
this.levelEmitter = new DamagedItemDefinition( "part.level_emitter", itemMultiPart.createPart( PartType.LevelEmitter ) );
|
||||
this.annihilationPlane = new DamagedItemDefinition( "part.plane.annihilation", itemMultiPart.createPart( PartType.AnnihilationPlane ) );
|
||||
this.identityAnnihilationPlane = new DamagedItemDefinition( "part.plane.annihiliation.identity", itemMultiPart.createPart( PartType.IdentityAnnihilationPlane ) );
|
||||
this.formationPlane = new DamagedItemDefinition( "part.plane.formation", itemMultiPart.createPart( PartType.FormationPlane ) );
|
||||
this.p2PTunnelME = new DamagedItemDefinition( "part.tunnel.me", itemMultiPart.createPart( PartType.P2PTunnelME ) );
|
||||
this.p2PTunnelRedstone = new DamagedItemDefinition( "part.tunnel.redstone", itemMultiPart.createPart( PartType.P2PTunnelRedstone ) );
|
||||
this.p2PTunnelItems = new DamagedItemDefinition( "part.tunnel.item", itemMultiPart.createPart( PartType.P2PTunnelItems ) );
|
||||
this.p2PTunnelLiquids = new DamagedItemDefinition( "part.tunnel.fluid", itemMultiPart.createPart( PartType.P2PTunnelLiquids ) );
|
||||
//this.p2PTunnelEU = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelEU ) );
|
||||
//this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||
this.p2PTunnelLight = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
||||
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
||||
//this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
|
||||
this.cableAnchor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.CableAnchor ) );
|
||||
this.monitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.Monitor ) );
|
||||
this.semiDarkMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
||||
this.darkMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.DarkMonitor ) );
|
||||
this.interfaceTerminal = new DamagedItemDefinition( itemMultiPart.createPart( PartType.InterfaceTerminal ) );
|
||||
this.patternTerminal = new DamagedItemDefinition( itemMultiPart.createPart( PartType.PatternTerminal ) );
|
||||
this.craftingTerminal = new DamagedItemDefinition( itemMultiPart.createPart( PartType.CraftingTerminal ) );
|
||||
this.terminal = new DamagedItemDefinition( itemMultiPart.createPart( PartType.Terminal ) );
|
||||
this.storageMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.StorageMonitor ) );
|
||||
this.conversionMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.ConversionMonitor ) );
|
||||
this.cableAnchor = new DamagedItemDefinition( "part.cable_anchor", itemMultiPart.createPart( PartType.CableAnchor ) );
|
||||
this.monitor = new DamagedItemDefinition( "part.monitor", itemMultiPart.createPart( PartType.Monitor ) );
|
||||
this.semiDarkMonitor = new DamagedItemDefinition( "part.monitor.semi_dark", itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
||||
this.darkMonitor = new DamagedItemDefinition( "part.monitor.dark", itemMultiPart.createPart( PartType.DarkMonitor ) );
|
||||
this.interfaceTerminal = new DamagedItemDefinition( "part.terminal.interface", itemMultiPart.createPart( PartType.InterfaceTerminal ) );
|
||||
this.patternTerminal = new DamagedItemDefinition( "part.terminal.pattern", itemMultiPart.createPart( PartType.PatternTerminal ) );
|
||||
this.craftingTerminal = new DamagedItemDefinition( "part.terminal.crafting", itemMultiPart.createPart( PartType.CraftingTerminal ) );
|
||||
this.terminal = new DamagedItemDefinition( "part.terminal", itemMultiPart.createPart( PartType.Terminal ) );
|
||||
this.storageMonitor = new DamagedItemDefinition( "part.monitor.storage", itemMultiPart.createPart( PartType.StorageMonitor ) );
|
||||
this.conversionMonitor = new DamagedItemDefinition( "part.monitor.conversion", itemMultiPart.createPart( PartType.ConversionMonitor ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -47,7 +47,8 @@ public final class AEBlockFeatureHandler implements IFeatureHandler
|
||||
this.featured = featured;
|
||||
this.extractor = new FeatureNameExtractor( featured.getClass(), subName );
|
||||
this.enabled = state == ActivityState.Enabled;
|
||||
this.definition = new BlockDefinition( featured, state );
|
||||
// TODO use real identifier
|
||||
this.definition = new BlockDefinition( featured.getClass().getSimpleName(), featured, state );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,25 +64,29 @@ public final class AEBlockFeatureHandler implements IFeatureHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(Side side)
|
||||
public void register( Side side )
|
||||
{
|
||||
if( this.enabled )
|
||||
{
|
||||
String name = this.extractor.get();
|
||||
this.featured.setCreativeTab( CreativeTab.instance );
|
||||
this.featured.setUnlocalizedName( /* "tile." */"appliedenergistics2." + name );
|
||||
this.featured.setUnlocalizedName( "appliedenergistics2." + name );
|
||||
this.featured.setBlockTextureName( name );
|
||||
|
||||
// Bypass the forge magic with null to register our own itemblock later.
|
||||
GameRegistry.registerBlock( this.featured, null, name );
|
||||
GameRegistry.registerItem( this.definition.maybeItem().get(), name );
|
||||
|
||||
|
||||
// register the block/item conversion...
|
||||
if ( this.definition.maybeItem().isPresent() )
|
||||
GameData.getBlockItemMap().put( this.featured, this.definition.maybeItem().get() );
|
||||
|
||||
if ( side == Side.CLIENT)
|
||||
CommonHelper.proxy.configureIcon( this.featured, name );
|
||||
if( this.definition.maybeItem().isPresent() )
|
||||
{
|
||||
GameData.getBlockItemMap().put( this.featured, this.definition.maybeItem().get() );
|
||||
}
|
||||
|
||||
if( side == Side.CLIENT )
|
||||
{
|
||||
CommonHelper.proxy.configureIcon( this.featured, name );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,10 +21,13 @@ package appeng.core.features;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import appeng.api.definitions.ITileDefinition;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
@@ -32,8 +35,6 @@ import appeng.core.CommonHelper;
|
||||
import appeng.core.CreativeTab;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
||||
public final class AECableBusFeatureHandler implements IFeatureHandler
|
||||
{
|
||||
@@ -49,7 +50,7 @@ public final class AECableBusFeatureHandler implements IFeatureHandler
|
||||
this.featured = featured;
|
||||
this.extractor = new FeatureNameExtractor( featured.getClass(), subName );
|
||||
this.enabled = state == ActivityState.Enabled;
|
||||
this.definition = new TileDefinition( featured, state );
|
||||
this.definition = new TileDefinition( featured.getClass().getSimpleName(), featured, state );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -25,53 +25,111 @@ public enum AEFeature
|
||||
// is just flat out required by tons of
|
||||
// important stuff.
|
||||
|
||||
CertusQuartzWorldGen( "World" ), MeteoriteWorldGen( "World" ),
|
||||
|
||||
DecorativeLights( "World" ), DecorativeQuartzBlocks( "World" ), SkyStoneChests( "World" ), SpawnPressesInMeteorites( "World" ),
|
||||
|
||||
GrindStone( "World" ), Flour( "World" ), Inscriber( "World" ),
|
||||
|
||||
ChestLoot( "World" ), VillagerTrading( "World" ),
|
||||
|
||||
CertusQuartzWorldGen( "World" ),
|
||||
MeteoriteWorldGen( "World" ),
|
||||
DecorativeLights( "World" ),
|
||||
DecorativeQuartzBlocks( "World" ),
|
||||
SkyStoneChests( "World" ),
|
||||
SpawnPressesInMeteorites( "World" ),
|
||||
GrindStone( "World" ),
|
||||
Flour( "World" ),
|
||||
Inscriber( "World" ),
|
||||
ChestLoot( "World" ),
|
||||
VillagerTrading( "World" ),
|
||||
TinyTNT( "World" ),
|
||||
|
||||
PoweredTools( "ToolsClassifications" ),
|
||||
|
||||
CertusQuartzTools( "ToolsClassifications" ),
|
||||
|
||||
NetherQuartzTools( "ToolsClassifications" ),
|
||||
|
||||
QuartzHoe( "Tools" ), QuartzSpade( "Tools" ), QuartzSword( "Tools" ), QuartzPickaxe( "Tools" ), QuartzAxe( "Tools" ), QuartzKnife( "Tools" ), QuartzWrench( "Tools" ),
|
||||
QuartzHoe( "Tools" ),
|
||||
QuartzSpade( "Tools" ),
|
||||
QuartzSword( "Tools" ),
|
||||
QuartzPickaxe( "Tools" ),
|
||||
QuartzAxe( "Tools" ),
|
||||
QuartzKnife( "Tools" ),
|
||||
QuartzWrench( "Tools" ),
|
||||
ChargedStaff( "Tools" ),
|
||||
EntropyManipulator( "Tools" ),
|
||||
MatterCannon( "Tools" ),
|
||||
WirelessAccessTerminal( "Tools" ),
|
||||
ColorApplicator( "Tools" ),
|
||||
PaintBalls( "Tools" ),
|
||||
MeteoriteCompass( "Tools" ),
|
||||
|
||||
ChargedStaff( "Tools" ), EntropyManipulator( "Tools" ), MatterCannon( "Tools" ), WirelessAccessTerminal( "Tools" ), ColorApplicator( "Tools" ),
|
||||
CraftingCPU( "CraftingFeatures" ),
|
||||
|
||||
CraftingCPU( "CraftingFeatures" ), PowerGen( "NetworkFeatures" ), Security( "NetworkFeatures" ),
|
||||
PowerGen( "NetworkFeatures" ),
|
||||
Security( "NetworkFeatures" ),
|
||||
SpatialIO( "NetworkFeatures" ),
|
||||
QuantumNetworkBridge( "NetworkFeatures" ),
|
||||
Channels( "NetworkFeatures" ),
|
||||
|
||||
SpatialIO( "NetworkFeatures" ), QuantumNetworkBridge( "NetworkFeatures" ), Channels( "NetworkFeatures" ),
|
||||
LevelEmitter( "NetworkBuses" ),
|
||||
CraftingTerminal( "NetworkBuses" ),
|
||||
StorageMonitor( "NetworkBuses" ),
|
||||
P2PTunnel( "NetworkBuses" ),
|
||||
FormationPlane( "NetworkBuses" ),
|
||||
AnnihilationPlane( "NetworkBuses" ),
|
||||
IdentityAnnihilationPlane( "NetworkBuses" ),
|
||||
ImportBus( "NetworkBuses" ),
|
||||
ExportBus( "NetworkBuses" ),
|
||||
StorageBus( "NetworkBuses" ),
|
||||
PartConversionMonitor( "NetworkBuses" ),
|
||||
|
||||
LevelEmitter( "NetworkBuses" ), CraftingTerminal( "NetworkBuses" ), StorageMonitor( "NetworkBuses" ), P2PTunnel( "NetworkBuses" ), FormationPlane( "NetworkBuses" ), AnnihilationPlane( "NetworkBuses" ), IdentityAnnihilationPlane( "NetworkBuses" ), ImportBus( "NetworkBuses" ), ExportBus( "NetworkBuses" ), StorageBus( "NetworkBuses" ), PartConversionMonitor( "NetworkBuses" ),
|
||||
StorageCells( "Storage" ),
|
||||
MEChest( "Storage" ),
|
||||
MEDrive( "Storage" ),
|
||||
IOPort( "Storage" ),
|
||||
|
||||
StorageCells( "Storage" ), PortableCell( "PortableCell" ), MEChest( "Storage" ), MEDrive( "Storage" ), IOPort( "Storage" ),
|
||||
PortableCell( "PortableCell" ),
|
||||
|
||||
NetworkTool( "NetworkTool" ),
|
||||
|
||||
DenseEnergyCells( "HigherCapacity" ), DenseCables( "HigherCapacity" ),
|
||||
DenseEnergyCells( "HigherCapacity" ),
|
||||
DenseCables( "HigherCapacity" ),
|
||||
|
||||
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ),
|
||||
P2PTunnelRF( "P2PTunnels" ),
|
||||
P2PTunnelME( "P2PTunnels" ),
|
||||
P2PTunnelItems( "P2PTunnels" ),
|
||||
P2PTunnelRedstone( "P2PTunnels" ),
|
||||
P2PTunnelEU( "P2PTunnels" ),
|
||||
P2PTunnelLiquids( "P2PTunnels" ),
|
||||
P2PTunnelLight( "P2PTunnels" ),
|
||||
P2PTunnelOpenComputers( "P2PTunnels" ),
|
||||
|
||||
MassCannonBlockDamage( "BlockFeatures" ), TinyTNTBlockDamage( "BlockFeatures" ), Facades( "Facades" ),
|
||||
MassCannonBlockDamage( "BlockFeatures" ),
|
||||
TinyTNTBlockDamage( "BlockFeatures" ),
|
||||
|
||||
UnsupportedDeveloperTools( "Misc", false ), Creative( "Misc" ),
|
||||
Facades( "Facades" ),
|
||||
|
||||
GrinderLogging( "Misc", false ), Logging( "Misc" ), IntegrationLogging( "Misc", false ), WebsiteRecipes( "Misc", false ),
|
||||
UnsupportedDeveloperTools( "Misc", false ),
|
||||
Creative( "Misc" ),
|
||||
GrinderLogging( "Misc", false ),
|
||||
Logging( "Misc" ),
|
||||
IntegrationLogging( "Misc", false ),
|
||||
WebsiteRecipes( "Misc", false ),
|
||||
UpdateLogging( "Misc", false ),
|
||||
PacketLogging( "Misc", false ),
|
||||
CraftingLog( "Misc", false ),
|
||||
LightDetector( "Misc" ),
|
||||
LogSecurityAudits( "Misc", false ),
|
||||
Achievements( "Misc" ),
|
||||
|
||||
enableFacadeCrafting( "Crafting" ), inWorldSingularity( "Crafting" ), inWorldFluix( "Crafting" ), inWorldPurification( "Crafting" ), UpdateLogging( "Misc", false ),
|
||||
enableFacadeCrafting( "Crafting" ),
|
||||
inWorldSingularity( "Crafting" ),
|
||||
inWorldFluix( "Crafting" ),
|
||||
inWorldPurification( "Crafting" ),
|
||||
InterfaceTerminal( "Crafting" ),
|
||||
|
||||
AlphaPass( "Rendering" ), PaintBalls( "Tools" ), PacketLogging( "Misc", false ), CraftingLog( "Misc", false ), InterfaceTerminal( "Crafting" ), LightDetector( "Misc" ),
|
||||
AlphaPass( "Rendering" ),
|
||||
|
||||
enableDisassemblyCrafting( "Crafting" ), MolecularAssembler( "CraftingFeatures" ), MeteoriteCompass( "Tools" ), Patterns( "CraftingFeatures" ),
|
||||
MolecularAssembler( "CraftingFeatures" ),
|
||||
|
||||
ChunkLoggerTrace( "Commands", false ), LogSecurityAudits( "Misc", false ), Achievements( "Misc" );
|
||||
enableDisassemblyCrafting( "Crafting" ),
|
||||
Patterns( "CraftingFeatures" ),
|
||||
|
||||
ChunkLoggerTrace( "Commands", false );
|
||||
|
||||
public final String category;
|
||||
public final boolean isVisible;
|
||||
@@ -79,7 +137,7 @@ public enum AEFeature
|
||||
|
||||
AEFeature( String cat )
|
||||
{
|
||||
this(cat, true);
|
||||
this( cat, true );
|
||||
}
|
||||
|
||||
AEFeature( String cat, boolean defaultValue )
|
||||
|
||||
@@ -21,17 +21,18 @@ package appeng.core.features;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraftforge.fml.common.registry.GameData;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import appeng.api.definitions.ITileDefinition;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.CreativeTab;
|
||||
import appeng.util.Platform;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
||||
public final class AETileBlockFeatureHandler implements IFeatureHandler
|
||||
{
|
||||
@@ -47,7 +48,7 @@ public final class AETileBlockFeatureHandler implements IFeatureHandler
|
||||
this.featured = featured;
|
||||
this.extractor = new FeatureNameExtractor( featured.getClass(), subName );
|
||||
this.enabled = state == ActivityState.Enabled;
|
||||
this.definition = new TileDefinition( featured, state );
|
||||
this.definition = new TileDefinition( featured.getClass().getSimpleName(), featured, state );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -63,7 +64,7 @@ public final class AETileBlockFeatureHandler implements IFeatureHandler
|
||||
}
|
||||
|
||||
@Override
|
||||
public void register(Side side)
|
||||
public void register( Side side )
|
||||
{
|
||||
if( this.enabled )
|
||||
{
|
||||
@@ -82,15 +83,19 @@ public final class AETileBlockFeatureHandler implements IFeatureHandler
|
||||
// Bypass the forge magic with null to register our own itemblock later.
|
||||
GameRegistry.registerBlock( this.featured, null, registryName );
|
||||
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
||||
|
||||
|
||||
// register the block/item conversion...
|
||||
if ( this.featured != null && this.definition.maybeItem().isPresent() )
|
||||
GameData.getBlockItemMap().put( this.featured, this.definition.maybeItem().get() );
|
||||
|
||||
if( this.definition.maybeItem().isPresent() )
|
||||
{
|
||||
GameData.getBlockItemMap().put( this.featured, this.definition.maybeItem().get() );
|
||||
}
|
||||
|
||||
GameRegistry.registerTileEntity( this.featured.getTileEntityClass(), this.featured.toString() );
|
||||
|
||||
if ( side == Side.CLIENT)
|
||||
CommonHelper.proxy.configureIcon( this.featured, name );
|
||||
if( side == Side.CLIENT )
|
||||
{
|
||||
CommonHelper.proxy.configureIcon( this.featured, name );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,28 +21,29 @@ package appeng.core.features;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.block.AEBaseBlock;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Preconditions;
|
||||
import com.google.common.collect.ObjectArrays;
|
||||
|
||||
|
||||
public class BlockDefinition extends ItemDefinition implements IBlockDefinition
|
||||
{
|
||||
private final Block block;
|
||||
private final boolean enabled;
|
||||
|
||||
public BlockDefinition( Block block, ActivityState state )
|
||||
public BlockDefinition( final String identifier, Block block, ActivityState state )
|
||||
{
|
||||
super( constructItemFromBlock( block ), state );
|
||||
super( identifier, constructItemFromBlock( block ), state );
|
||||
|
||||
Preconditions.checkNotNull( block );
|
||||
Preconditions.checkNotNull( state );
|
||||
|
||||
@@ -21,23 +21,35 @@ package appeng.core.features;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.definitions.IItemDefinition;
|
||||
|
||||
|
||||
public final class DamagedItemDefinition implements IItemDefinition
|
||||
{
|
||||
private final String identifier;
|
||||
private final IStackSrc source;
|
||||
|
||||
public DamagedItemDefinition( @Nonnull IStackSrc source )
|
||||
public DamagedItemDefinition( @Nonnull String identifier, @Nonnull IStackSrc source )
|
||||
{
|
||||
this.source = Preconditions.checkNotNull( source );
|
||||
Preconditions.checkNotNull( identifier );
|
||||
Preconditions.checkArgument( !identifier.isEmpty() );
|
||||
Preconditions.checkNotNull( source );
|
||||
|
||||
this.identifier = identifier;
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String identifier()
|
||||
{
|
||||
return this.identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -59,11 +71,7 @@ public final class DamagedItemDefinition implements IItemDefinition
|
||||
@Override
|
||||
public boolean isSameAs( ItemStack comparableStack )
|
||||
{
|
||||
if( comparableStack == null )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return comparableStack.getItem() == this.source.getItem() && comparableStack.getItemDamage() == this.source.getDamage();
|
||||
// is available && is same item && has same damage
|
||||
return comparableStack != null && comparableStack.getItem() == this.source.getItem() && comparableStack.getItemDamage() == this.source.getDamage();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
package appeng.core.features;
|
||||
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
@@ -31,18 +33,29 @@ import appeng.util.Platform;
|
||||
|
||||
public class ItemDefinition implements IItemDefinition
|
||||
{
|
||||
private final String identifier;
|
||||
private final Item item;
|
||||
private final boolean enabled;
|
||||
|
||||
public ItemDefinition( Item item, ActivityState state )
|
||||
public ItemDefinition( String identifier, Item item, ActivityState state )
|
||||
{
|
||||
Preconditions.checkNotNull( identifier );
|
||||
Preconditions.checkArgument( !identifier.isEmpty() );
|
||||
Preconditions.checkNotNull( item );
|
||||
Preconditions.checkNotNull( state );
|
||||
|
||||
this.identifier = identifier;
|
||||
this.item = item;
|
||||
this.enabled = state == ActivityState.Enabled;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
@Override
|
||||
public String identifier()
|
||||
{
|
||||
return this.identifier;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final Optional<Item> maybeItem()
|
||||
{
|
||||
|
||||
@@ -48,7 +48,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
|
||||
this.item = item;
|
||||
this.extractor = new FeatureNameExtractor( featured.getClass(), subName );
|
||||
this.enabled = state == ActivityState.Enabled;
|
||||
this.definition = new ItemDefinition( item, state );
|
||||
this.definition = new ItemDefinition( item.getClass().getSimpleName(), item, state );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -72,7 +72,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
|
||||
String itemPhysicalName = name;
|
||||
|
||||
//this.item.setTextureName( "appliedenergistics2:" + name );
|
||||
this.item.setUnlocalizedName( /* "item." */"appliedenergistics2." + name );
|
||||
this.item.setUnlocalizedName( "appliedenergistics2." + name );
|
||||
|
||||
if( this.item instanceof ItemFacade )
|
||||
{
|
||||
|
||||
@@ -24,10 +24,13 @@ import java.util.EnumSet;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.BlockStairs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.CreativeTab;
|
||||
|
||||
|
||||
@@ -45,7 +48,7 @@ public class StairBlockFeatureHandler implements IFeatureHandler
|
||||
this.stairs = stairs;
|
||||
this.extractor = new FeatureNameExtractor( stairs.getClass(), subName );
|
||||
this.enabled = state == ActivityState.Enabled;
|
||||
this.definition = new BlockDefinition( stairs, state );
|
||||
this.definition = new BlockDefinition( stairs.getClass().getSimpleName(), stairs, state );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -69,8 +72,13 @@ public class StairBlockFeatureHandler implements IFeatureHandler
|
||||
this.stairs.setCreativeTab( CreativeTab.instance );
|
||||
this.stairs.setUnlocalizedName( "appliedenergistics2." + name );
|
||||
|
||||
// "tile." +
|
||||
GameRegistry.registerBlock( this.stairs, name );
|
||||
|
||||
if( side == Side.CLIENT )
|
||||
{
|
||||
final Item item = ItemBlock.getItemFromBlock( this.stairs );
|
||||
CommonHelper.proxy.configureIcon( item, name );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,25 +19,26 @@
|
||||
package appeng.core.features;
|
||||
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import appeng.api.definitions.ITileDefinition;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
import appeng.api.definitions.ITileDefinition;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
|
||||
|
||||
public final class TileDefinition extends BlockDefinition implements ITileDefinition
|
||||
{
|
||||
private final AEBaseTileBlock block;
|
||||
|
||||
public TileDefinition( AEBaseTileBlock block, ActivityState state )
|
||||
public TileDefinition( @Nonnull final String identifier, AEBaseTileBlock block, ActivityState state )
|
||||
{
|
||||
super( block, state );
|
||||
super( identifier, block, state );
|
||||
|
||||
Preconditions.checkNotNull( block );
|
||||
Preconditions.checkNotNull( state );
|
||||
Preconditions.checkNotNull( block.getTileEntityClass() );
|
||||
|
||||
this.block = block;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,6 @@ import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.Configuration;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
|
||||
import appeng.core.AELog;
|
||||
import appeng.core.CommonHelper;
|
||||
|
||||
|
||||
@@ -66,7 +65,7 @@ final class PlayerData implements IWorldPlayerData, IOnWorldStartable, IOnWorldS
|
||||
this.config = new Configuration( configFile, configVersion );
|
||||
|
||||
final ConfigCategory playerList = this.config.getCategory( "players" );
|
||||
this.playerMapping = new PlayerMapping( playerList, AELog.INSTANCE );
|
||||
this.playerMapping = new PlayerMapping( playerList );
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
||||
@@ -27,9 +27,6 @@ import com.google.common.base.Optional;
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.fml.relauncher.FMLRelaunchLog;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
|
||||
/**
|
||||
@@ -46,9 +43,9 @@ final class PlayerMapping implements IWorldPlayerMapping
|
||||
*/
|
||||
private final Map<Integer, UUID> mappings;
|
||||
|
||||
public PlayerMapping( ConfigCategory category, FMLRelaunchLog log )
|
||||
public PlayerMapping( ConfigCategory category )
|
||||
{
|
||||
final PlayerMappingsInitializer init = new PlayerMappingsInitializer( category, log );
|
||||
final PlayerMappingsInitializer init = new PlayerMappingsInitializer( category );
|
||||
|
||||
this.mappings = init.getPlayerMappings();
|
||||
}
|
||||
|
||||
@@ -25,7 +25,6 @@ import java.util.UUID;
|
||||
|
||||
import net.minecraftforge.common.config.ConfigCategory;
|
||||
import net.minecraftforge.common.config.Property;
|
||||
import net.minecraftforge.fml.relauncher.FMLRelaunchLog;
|
||||
|
||||
import appeng.core.AELog;
|
||||
import appeng.util.UUIDMatcher;
|
||||
@@ -50,9 +49,8 @@ class PlayerMappingsInitializer
|
||||
* where the UUIDs were introduced.
|
||||
*
|
||||
* @param playerList the category for the player list, generally extracted using the "players" tag
|
||||
* @param log the logger used to warn the server or user of faulty entries
|
||||
*/
|
||||
PlayerMappingsInitializer( ConfigCategory playerList, FMLRelaunchLog log )
|
||||
PlayerMappingsInitializer( ConfigCategory playerList )
|
||||
{
|
||||
// Matcher for UUIDs
|
||||
final UUIDMatcher matcher = new UUIDMatcher();
|
||||
@@ -61,7 +59,7 @@ class PlayerMappingsInitializer
|
||||
final int capacity = playerList.size();
|
||||
|
||||
// Mappings for the IDs is a regular HashMap
|
||||
this.playerMappings = new HashMap<Integer, UUID>( capacity );
|
||||
this.playerMappings = new HashMap<>( capacity );
|
||||
|
||||
// Iterates through every pair of UUID to ID
|
||||
for( Map.Entry<String, Property> entry : playerList.getValues().entrySet() )
|
||||
|
||||
Reference in New Issue
Block a user