Formatted code
This commit is contained in:
@@ -81,7 +81,7 @@ public final class Api implements IAppEngApi
|
||||
@Override
|
||||
public IGridNode createGridNode( final IGridBlock blk )
|
||||
{
|
||||
if ( Platform.isClient() )
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ public abstract class CommonHelper
|
||||
|
||||
public abstract World getWorld();
|
||||
|
||||
public abstract void bindTileEntitySpecialRenderer( Class <? extends TileEntity> tile, AEBaseBlock blk );
|
||||
public abstract void bindTileEntitySpecialRenderer( Class<? extends TileEntity> tile, AEBaseBlock blk );
|
||||
|
||||
public abstract List<EntityPlayer> getPlayers();
|
||||
|
||||
@@ -71,8 +71,8 @@ public abstract class CommonHelper
|
||||
public abstract void updateRenderMode( EntityPlayer player );
|
||||
|
||||
public abstract void missingCoreMod();
|
||||
|
||||
public abstract void configureIcon(Object item, String name );
|
||||
|
||||
public abstract void configureIcon( Object item, String name );
|
||||
|
||||
public abstract ResourceLocation addIcon(
|
||||
String string );
|
||||
|
||||
@@ -70,7 +70,8 @@ public class IMCHandler
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to find every message matching the internal IMC keys. When found the corresponding handler will process the attached message.
|
||||
* Tries to find every message matching the internal IMC keys. When found the corresponding handler will process the
|
||||
* attached message.
|
||||
*
|
||||
* @param event Event carrying the identifier and message for the handlers
|
||||
*/
|
||||
|
||||
@@ -144,15 +144,15 @@ public final class ApiBlocks implements IBlocks
|
||||
private final IBlockDefinition chiseledQuartzStair;
|
||||
private final IBlockDefinition quartzPillarStair;
|
||||
/*
|
||||
private final IBlockDefinition skyStoneSlab;
|
||||
private final IBlockDefinition skyStoneBlockSlab;
|
||||
private final IBlockDefinition skyStoneBrickSlab;
|
||||
private final IBlockDefinition skyStoneSmallBrickSlab;
|
||||
private final IBlockDefinition fluixSlab;
|
||||
private final IBlockDefinition quartzSlab;
|
||||
private final IBlockDefinition chiseledQuartzSlab;
|
||||
private final IBlockDefinition quartzPillarSlab;
|
||||
*/
|
||||
* private final IBlockDefinition skyStoneSlab;
|
||||
* private final IBlockDefinition skyStoneBlockSlab;
|
||||
* private final IBlockDefinition skyStoneBrickSlab;
|
||||
* private final IBlockDefinition skyStoneSmallBrickSlab;
|
||||
* private final IBlockDefinition fluixSlab;
|
||||
* private final IBlockDefinition quartzSlab;
|
||||
* private final IBlockDefinition chiseledQuartzSlab;
|
||||
* private final IBlockDefinition quartzPillarSlab;
|
||||
*/
|
||||
|
||||
private final IBlockDefinition itemGen;
|
||||
private final IBlockDefinition chunkLoader;
|
||||
@@ -161,7 +161,7 @@ public final class ApiBlocks implements IBlocks
|
||||
|
||||
public ApiBlocks( final DefinitionConstructor constructor )
|
||||
{
|
||||
// this.quartzOre = new BlockDefinition( "ore.quartz", new OreQuartz() );
|
||||
// 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() );
|
||||
@@ -226,15 +226,23 @@ public final class ApiBlocks implements IBlocks
|
||||
|
||||
// TODO Re-Add Slabs...
|
||||
/*
|
||||
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_stone, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
|
||||
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_block, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
|
||||
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_brick, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
|
||||
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_smallbrick, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
|
||||
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
|
||||
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
|
||||
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
|
||||
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) )
|
||||
*/
|
||||
* this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_stone,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
|
||||
* this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_block,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
|
||||
* this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_brick,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
|
||||
* this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone_smallbrick,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
|
||||
* this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
|
||||
* this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
|
||||
* this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
|
||||
* this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar,
|
||||
* EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) )
|
||||
*/
|
||||
|
||||
this.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
||||
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
||||
@@ -403,54 +411,47 @@ public final class ApiBlocks implements IBlocks
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public IBlockDefinition skyStoneSlab()
|
||||
{
|
||||
return this.skyStoneSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockDefinition skyStoneBlockSlab()
|
||||
{
|
||||
return this.skyStoneBlockSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockDefinition skyStoneBrickSlab()
|
||||
{
|
||||
return this.skyStoneBrickSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockDefinition skyStoneSmallBrickSlab()
|
||||
{
|
||||
return this.skyStoneSmallBrickSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockDefinition fluixSlab()
|
||||
{
|
||||
return this.fluixSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockDefinition quartzSlab()
|
||||
{
|
||||
return this.quartzSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockDefinition chiseledQuartzSlab()
|
||||
{
|
||||
return this.chiseledQuartzSlab;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IBlockDefinition quartzPillarSlab()
|
||||
{
|
||||
return this.quartzPillarSlab;
|
||||
}
|
||||
*/
|
||||
* @Override
|
||||
* public IBlockDefinition skyStoneSlab()
|
||||
* {
|
||||
* return this.skyStoneSlab;
|
||||
* }
|
||||
* @Override
|
||||
* public IBlockDefinition skyStoneBlockSlab()
|
||||
* {
|
||||
* return this.skyStoneBlockSlab;
|
||||
* }
|
||||
* @Override
|
||||
* public IBlockDefinition skyStoneBrickSlab()
|
||||
* {
|
||||
* return this.skyStoneBrickSlab;
|
||||
* }
|
||||
* @Override
|
||||
* public IBlockDefinition skyStoneSmallBrickSlab()
|
||||
* {
|
||||
* return this.skyStoneSmallBrickSlab;
|
||||
* }
|
||||
* @Override
|
||||
* public IBlockDefinition fluixSlab()
|
||||
* {
|
||||
* return this.fluixSlab;
|
||||
* }
|
||||
* @Override
|
||||
* public IBlockDefinition quartzSlab()
|
||||
* {
|
||||
* return this.quartzSlab;
|
||||
* }
|
||||
* @Override
|
||||
* public IBlockDefinition chiseledQuartzSlab()
|
||||
* {
|
||||
* return this.chiseledQuartzSlab;
|
||||
* }
|
||||
* @Override
|
||||
* public IBlockDefinition quartzPillarSlab()
|
||||
* {
|
||||
* return this.quartzPillarSlab;
|
||||
* }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public ITileDefinition grindStone()
|
||||
|
||||
@@ -126,7 +126,6 @@ public final class ApiMaterials implements IMaterials
|
||||
this.logicProcessorPrint = new DamagedItemDefinition( "material.print.processor.logic", materials.createMaterial( MaterialType.LogicProcessorPrint ) );
|
||||
this.siliconPrint = new DamagedItemDefinition( "material.print.silicon", materials.createMaterial( MaterialType.SiliconPrint ) );
|
||||
|
||||
|
||||
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 ) );
|
||||
|
||||
@@ -57,11 +57,11 @@ public final class ApiParts implements IParts
|
||||
private final IItemDefinition p2PTunnelRedstone;
|
||||
private final IItemDefinition p2PTunnelItems;
|
||||
private final IItemDefinition p2PTunnelLiquids;
|
||||
//private final IItemDefinition p2PTunnelEU;
|
||||
//private final IItemDefinition p2PTunnelRF;
|
||||
// private final IItemDefinition p2PTunnelEU;
|
||||
// private final IItemDefinition p2PTunnelRF;
|
||||
private final IItemDefinition p2PTunnelLight;
|
||||
// private final IItemDefinition p2PTunnelOpenComputers;
|
||||
// private final IItemDefinition p2PTunnelPneumaticCraft;
|
||||
// private final IItemDefinition p2PTunnelOpenComputers;
|
||||
// private final IItemDefinition p2PTunnelPneumaticCraft;
|
||||
private final IItemDefinition cableAnchor;
|
||||
private final IItemDefinition monitor;
|
||||
private final IItemDefinition semiDarkMonitor;
|
||||
@@ -101,11 +101,13 @@ public final class ApiParts implements IParts
|
||||
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.p2PTunnelEU = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelEU ) );
|
||||
// this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||
this.p2PTunnelLight = new DamagedItemDefinition( "part.tunnel.light", itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
||||
//this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
|
||||
// this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelPressure ) );
|
||||
// this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart(
|
||||
// PartType.P2PTunnelOpenComputers ) );
|
||||
// this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart(
|
||||
// PartType.P2PTunnelPressure ) );
|
||||
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 ) );
|
||||
@@ -259,41 +261,39 @@ public final class ApiParts implements IParts
|
||||
{
|
||||
return this.p2PTunnelLiquids;
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelEU()
|
||||
{
|
||||
return this.p2PTunnelEU;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelRF()
|
||||
{
|
||||
return this.p2PTunnelRF;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* @Override
|
||||
* public IItemDefinition p2PTunnelEU()
|
||||
* {
|
||||
* return this.p2PTunnelEU;
|
||||
* }
|
||||
* @Override
|
||||
* public IItemDefinition p2PTunnelRF()
|
||||
* {
|
||||
* return this.p2PTunnelRF;
|
||||
* }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelLight()
|
||||
{
|
||||
return this.p2PTunnelLight;
|
||||
}
|
||||
|
||||
/*
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelOpenComputers()
|
||||
{
|
||||
return this.p2PTunnelOpenComputers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelPneumaticCraft()
|
||||
{
|
||||
return this.p2PTunnelPneumaticCraft;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
* @Override
|
||||
* public IItemDefinition p2PTunnelOpenComputers()
|
||||
* {
|
||||
* return this.p2PTunnelOpenComputers;
|
||||
* }
|
||||
* @Override
|
||||
* public IItemDefinition p2PTunnelPneumaticCraft()
|
||||
* {
|
||||
* return this.p2PTunnelPneumaticCraft;
|
||||
* }
|
||||
*/
|
||||
|
||||
@Override
|
||||
public IItemDefinition cableAnchor()
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ public class DefinitionConstructor
|
||||
|
||||
if( definition instanceof ITileDefinition )
|
||||
{
|
||||
return ( (ITileDefinition) definition );
|
||||
return( (ITileDefinition) definition );
|
||||
}
|
||||
|
||||
throw new IllegalStateException( "No tile definition for " + feature );
|
||||
@@ -65,7 +65,7 @@ public class DefinitionConstructor
|
||||
|
||||
if( definition instanceof IBlockDefinition )
|
||||
{
|
||||
return ( (IBlockDefinition) definition );
|
||||
return( (IBlockDefinition) definition );
|
||||
}
|
||||
|
||||
throw new IllegalStateException( "No block definition for " + feature );
|
||||
|
||||
@@ -18,35 +18,35 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setInteger( "turns", 8 );
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setInteger( "turns", 8 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
|
||||
-- or --
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound optional = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound optional = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setTag( "optional", optional );
|
||||
msg.setFloat( "chance", 0.5 );
|
||||
msg.setInteger( "turns", 8 );
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setTag( "optional", optional );
|
||||
msg.setFloat( "chance", 0.5 );
|
||||
msg.setInteger( "turns", 8 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound item = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound item = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||
msg.setTag( "item", item );
|
||||
msg.setDouble( "weight", 32.0 );
|
||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||
msg.setTag( "item", item );
|
||||
msg.setDouble( "weight", 32.0 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.crash;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.crash;
|
||||
|
||||
|
||||
@@ -7,7 +8,7 @@ import appeng.core.AEConfig;
|
||||
public class ModCrashEnhancement extends BaseCrashEnhancement
|
||||
{
|
||||
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
||||
|
||||
@@ -69,7 +69,7 @@ public final class AECableBusFeatureHandler implements IFeatureHandler
|
||||
* Registration of the {@link TileEntity} will actually be handled by {@link BlockCableBus#setupTile()}.
|
||||
*/
|
||||
@Override
|
||||
public void register( final Side side)
|
||||
public void register( final Side side )
|
||||
{
|
||||
if( this.enabled )
|
||||
{
|
||||
@@ -88,13 +88,13 @@ public final class AECableBusFeatureHandler 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 ( side == Side.CLIENT)
|
||||
CommonHelper.proxy.configureIcon( this.featured, name );
|
||||
// register the block/item conversion...
|
||||
if( this.featured != null && this.definition.maybeItem().isPresent() )
|
||||
GameData.getBlockItemMap().put( this.featured, this.definition.maybeItem().get() );
|
||||
|
||||
if( side == Side.CLIENT )
|
||||
CommonHelper.proxy.configureIcon( this.featured, name );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public final class AETileBlockFeatureHandler implements IFeatureHandler
|
||||
GameRegistry.registerBlock( this.featured, null, registryName );
|
||||
GameRegistry.registerItem( this.definition.maybeItem().get(), registryName );
|
||||
AEBaseTile.registerTileItem( this.featured.getTileEntityClass(), new BlockStackSrc( this.featured, 0, ActivityState.from( this.isFeatureAvailable() ) ) );
|
||||
|
||||
|
||||
// register the block/item conversion...
|
||||
if( this.definition.maybeItem().isPresent() )
|
||||
{
|
||||
|
||||
@@ -51,11 +51,11 @@ public class FeatureNameExtractor
|
||||
{
|
||||
name = PATTERN_ITEM_MULTI_MATERIAL.matcher( name ).replaceAll( "ItemMaterial" );
|
||||
}
|
||||
else if ( name.startsWith( "BlockStairCommon" ) )
|
||||
else if( name.startsWith( "BlockStairCommon" ) )
|
||||
{
|
||||
name = "stair";
|
||||
}
|
||||
else if ( name.startsWith( "BlockFluix" ) )
|
||||
else if( name.startsWith( "BlockFluix" ) )
|
||||
{
|
||||
name = "fluix";
|
||||
}
|
||||
|
||||
@@ -29,5 +29,5 @@ public interface IFeatureHandler
|
||||
|
||||
IItemDefinition getDefinition();
|
||||
|
||||
void register(Side side );
|
||||
void register( Side side );
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
|
||||
String name = this.extractor.get();
|
||||
final String itemPhysicalName = name;
|
||||
|
||||
//this.item.setTextureName( "appliedenergistics2:" + name );
|
||||
// this.item.setTextureName( "appliedenergistics2:" + name );
|
||||
this.item.setUnlocalizedName( "appliedenergistics2." + name );
|
||||
|
||||
if( this.item instanceof ItemFacade )
|
||||
@@ -92,7 +92,7 @@ public final class ItemFeatureHandler implements IFeatureHandler
|
||||
name = "ItemMultiPart";
|
||||
}
|
||||
|
||||
// "item." +
|
||||
// "item." +
|
||||
GameRegistry.registerItem( this.item, name );
|
||||
|
||||
if( side == Side.CLIENT )
|
||||
|
||||
@@ -164,8 +164,8 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
final ItemStack myItemStack = new ItemStack( item, 1, meta );
|
||||
|
||||
final ItemStack myItemStack = new ItemStack( item, 1, meta );
|
||||
return myItemStack;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features.registries.entries;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features.registries.entries;
|
||||
|
||||
|
||||
@@ -93,7 +94,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( !(o instanceof IInscriberRecipe) )
|
||||
if( !( o instanceof IInscriberRecipe ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -112,7 +113,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if( !this.maybeBot.equals( that.getBottomOptional()) )
|
||||
if( !this.maybeBot.equals( that.getBottomOptional() ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum PlayerMessages
|
||||
isNowLocked, isNowUnlocked,
|
||||
AmmoDepleted,
|
||||
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
||||
SettingCleared,;
|
||||
SettingCleared, ;
|
||||
|
||||
public IChatComponent get()
|
||||
{
|
||||
|
||||
@@ -33,14 +33,17 @@ public class PlayerDifferentiator
|
||||
{
|
||||
/**
|
||||
* Can determine if an {@link net.minecraft.entity.player.EntityPlayer} is not a real player.
|
||||
* This is based on if the {@param player} is:
|
||||
* This is based on if the
|
||||
*
|
||||
* @param player is:
|
||||
* - null
|
||||
* - dead
|
||||
* - fake
|
||||
*
|
||||
* @param player to be checked player
|
||||
*
|
||||
* @return true if {@param player} is not a real player
|
||||
* @return true if
|
||||
* @param player is not a real player
|
||||
*/
|
||||
boolean isNoPlayer( final EntityPlayer player )
|
||||
{
|
||||
|
||||
@@ -36,20 +36,25 @@ import appeng.core.features.AEFeature;
|
||||
public class PlayerStatsRegistration
|
||||
{
|
||||
/**
|
||||
* {@link net.minecraftforge.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the feature is enabled
|
||||
* {@link net.minecraftforge.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending
|
||||
* if the feature is enabled
|
||||
*/
|
||||
private final EventBus bus;
|
||||
|
||||
/**
|
||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the {@param config}
|
||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the
|
||||
*
|
||||
* @param config}
|
||||
*/
|
||||
private final boolean isAchievementFeatureEnabled;
|
||||
|
||||
/**
|
||||
* Constructs this with an {@link net.minecraftforge.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
|
||||
* Constructs this with an {@link net.minecraftforge.fml.common.eventhandler.EventBus} and
|
||||
* {@link appeng.core.AEConfig}.
|
||||
*
|
||||
* @param bus {@see #bus}
|
||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||
* @param bus {@see #bus}
|
||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the
|
||||
* {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||
*/
|
||||
public PlayerStatsRegistration( final EventBus bus, final AEConfig config )
|
||||
{
|
||||
@@ -58,7 +63,9 @@ public class PlayerStatsRegistration
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is true.
|
||||
* Registers the {@link appeng.core.stats.AchievementCraftingHandler} and
|
||||
* {@link appeng.core.stats.AchievementPickupHandler} to the {@link #bus} if {@link #isAchievementFeatureEnabled} is
|
||||
* true.
|
||||
*/
|
||||
public void registerAchievementHandlers()
|
||||
{
|
||||
@@ -74,7 +81,8 @@ public class PlayerStatsRegistration
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements} to a new {@link net.minecraftforge.common.AchievementPage}.
|
||||
* Registers the {@link appeng.core.stats.AchievementHierarchy} and adds all {@link appeng.core.stats.Achievements}
|
||||
* to a new {@link net.minecraftforge.common.AchievementPage}.
|
||||
*/
|
||||
public void registerAchievements()
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ public class AppEngPacketHandlerBase
|
||||
{
|
||||
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
||||
|
||||
|
||||
public enum PacketTypes
|
||||
{
|
||||
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
||||
|
||||
@@ -268,7 +268,7 @@ public enum GuiBridge implements IGuiHandler
|
||||
}
|
||||
if( ID.type.isTile() )
|
||||
{
|
||||
final TileEntity TE = w.getTileEntity( new BlockPos(x,y,z) );
|
||||
final TileEntity TE = w.getTileEntity( new BlockPos( x, y, z ) );
|
||||
if( TE instanceof IPartHost )
|
||||
{
|
||||
( (IPartHost) TE ).getPart( side );
|
||||
@@ -295,7 +295,7 @@ public enum GuiBridge implements IGuiHandler
|
||||
{
|
||||
if( it.getItem() instanceof IGuiItem )
|
||||
{
|
||||
return ( (IGuiItem) it.getItem() ).getGuiObject( it, w, new BlockPos(x,y,z) );
|
||||
return ( (IGuiItem) it.getItem() ).getGuiObject( it, w, new BlockPos( x, y, z ) );
|
||||
}
|
||||
|
||||
final IWirelessTermHandler wh = AEApi.instance().registries().wireless().getWirelessTerminalHandler( it );
|
||||
@@ -450,7 +450,7 @@ public enum GuiBridge implements IGuiHandler
|
||||
}
|
||||
if( ID.type.isTile() )
|
||||
{
|
||||
final TileEntity TE = w.getTileEntity( new BlockPos(x,y,z) );
|
||||
final TileEntity TE = w.getTileEntity( new BlockPos( x, y, z ) );
|
||||
if( TE instanceof IPartHost )
|
||||
{
|
||||
( (IPartHost) TE ).getPart( side );
|
||||
@@ -499,7 +499,7 @@ public enum GuiBridge implements IGuiHandler
|
||||
public boolean hasPermissions( final TileEntity te, final int x, final int y, final int z, final AEPartLocation side, final EntityPlayer player )
|
||||
{
|
||||
final World w = player.getEntityWorld();
|
||||
final BlockPos pos = new BlockPos(x,y,z);
|
||||
final BlockPos pos = new BlockPos( x, y, z );
|
||||
|
||||
if( Platform.hasPermissions( te != null ? new DimensionalCoord( te ) : new DimensionalCoord( player.worldObj, pos ), player ) )
|
||||
{
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
|
||||
package appeng.core.sync;
|
||||
|
||||
|
||||
public abstract class PacketCallState
|
||||
{
|
||||
|
||||
public abstract void call( AppEngPacket appEngPacket );
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -52,17 +52,17 @@ public class AppEngClientPacketHandler extends AppEngPacketHandlerBase implement
|
||||
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
|
||||
|
||||
final PacketCallState callState =
|
||||
new PacketCallState(){
|
||||
|
||||
@Override
|
||||
public void call(
|
||||
final AppEngPacket appEngPacket )
|
||||
{
|
||||
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
|
||||
}
|
||||
};
|
||||
|
||||
pack.setCallParam(callState);
|
||||
new PacketCallState(){
|
||||
|
||||
@Override
|
||||
public void call(
|
||||
final AppEngPacket appEngPacket )
|
||||
{
|
||||
appEngPacket.clientPacketData( manager, appEngPacket, Minecraft.getMinecraft().thePlayer );
|
||||
}
|
||||
};
|
||||
|
||||
pack.setCallParam( callState );
|
||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, Minecraft.getMinecraft() );
|
||||
callState.call( pack );
|
||||
}
|
||||
|
||||
@@ -46,20 +46,20 @@ public final class AppEngServerPacketHandler extends AppEngPacketHandlerBase imp
|
||||
{
|
||||
final int packetType = stream.readInt();
|
||||
final AppEngPacket pack = PacketTypes.getPacket( packetType ).parsePacket( stream );
|
||||
|
||||
|
||||
final PacketCallState callState =
|
||||
new PacketCallState(){
|
||||
|
||||
@Override
|
||||
public void call(
|
||||
final AppEngPacket appEngPacket )
|
||||
{
|
||||
appEngPacket.serverPacketData( manager, appEngPacket, player);
|
||||
}
|
||||
};
|
||||
|
||||
pack.setCallParam(callState);
|
||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ((EntityPlayerMP)player).getServerForPlayer() );
|
||||
new PacketCallState(){
|
||||
|
||||
@Override
|
||||
public void call(
|
||||
final AppEngPacket appEngPacket )
|
||||
{
|
||||
appEngPacket.serverPacketData( manager, appEngPacket, player );
|
||||
}
|
||||
};
|
||||
|
||||
pack.setCallParam( callState );
|
||||
PacketThreadUtil.checkThreadAndEnqueue( pack, handler, ( (EntityPlayerMP) player ).getServerForPlayer() );
|
||||
callState.call( pack );
|
||||
}
|
||||
catch( final InstantiationException e )
|
||||
|
||||
@@ -34,6 +34,7 @@ import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
import appeng.core.sync.AppEngPacket;
|
||||
import appeng.core.worlddata.WorldData;
|
||||
|
||||
|
||||
public class NetworkHandler
|
||||
{
|
||||
public static NetworkHandler instance;
|
||||
@@ -103,9 +104,9 @@ public class NetworkHandler
|
||||
{
|
||||
this.serveHandler.onPacketData( null, ev.handler, ev.packet, srv.playerEntity );
|
||||
}
|
||||
catch ( final ThreadQuickExitException ignored )
|
||||
catch( final ThreadQuickExitException ignored )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -119,9 +120,9 @@ public class NetworkHandler
|
||||
{
|
||||
this.clientHandler.onPacketData( null, ev.handler, ev.packet, null );
|
||||
}
|
||||
catch ( final ThreadQuickExitException ignored )
|
||||
catch( final ThreadQuickExitException ignored )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ public class PacketClick extends AppEngPacket
|
||||
if( is.getItem() instanceof ToolNetworkTool )
|
||||
{
|
||||
final ToolNetworkTool tnt = (ToolNetworkTool) is.getItem();
|
||||
tnt.serverSideToolLogic( is, player, player.worldObj, new BlockPos( this.x, this.y, this.z), EnumFacing.VALUES[ this.side ], this.hitX, this.hitY, this.hitZ );
|
||||
tnt.serverSideToolLogic( is, player, player.worldObj, new BlockPos( this.x, this.y, this.z ), EnumFacing.VALUES[this.side], this.hitX, this.hitY, this.hitZ );
|
||||
}
|
||||
|
||||
else if( maybeMemoryCard.isSameAs( is ) )
|
||||
|
||||
@@ -65,7 +65,7 @@ public final class PacketConfigButton extends AppEngPacket
|
||||
public void serverPacketData( final INetworkInfo manager, final AppEngPacket packet, final EntityPlayer player )
|
||||
{
|
||||
final EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||
if ( sender.openContainer instanceof AEBaseContainer )
|
||||
if( sender.openContainer instanceof AEBaseContainer )
|
||||
{
|
||||
final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||
if( baseContainer.getTarget() instanceof IConfigurableObject )
|
||||
|
||||
@@ -48,7 +48,7 @@ public interface IWorldPlayerMapping
|
||||
/**
|
||||
* Put in new players when they join the server
|
||||
*
|
||||
* @param id id of new player
|
||||
* @param id id of new player
|
||||
* @param uuid UUID of new player
|
||||
*/
|
||||
void put( int id, @Nonnull UUID uuid );
|
||||
|
||||
@@ -65,10 +65,11 @@ public class MeteorDataNameEncoder
|
||||
|
||||
/**
|
||||
* @param dimension ID of the processed dimension. Can be any integer
|
||||
* @param chunkX X coordinate of the chunk. Can be any integer
|
||||
* @param chunkZ Z coordinate of the chunk. Can be any integer
|
||||
* @param chunkX X coordinate of the chunk. Can be any integer
|
||||
* @param chunkZ Z coordinate of the chunk. Can be any integer
|
||||
*
|
||||
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be shifted to stay conform with the vanilla chunk system
|
||||
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be
|
||||
* shifted to stay conform with the vanilla chunk system
|
||||
*
|
||||
* @since rv3 05.06.2015
|
||||
*/
|
||||
|
||||
@@ -57,7 +57,8 @@ final class SpawnData implements IWorldSpawnData
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGenerated( final int dim, final int chunkX, final int chunkZ ) {
|
||||
public void setGenerated( final int dim, final int chunkX, final int chunkZ )
|
||||
{
|
||||
synchronized( SpawnData.class )
|
||||
{
|
||||
final NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
||||
|
||||
Reference in New Issue
Block a user