Code format
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
|
|
||||||
package appeng.block;
|
package appeng.block;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.item.ItemSlab;
|
import net.minecraft.item.ItemSlab;
|
||||||
|
|
||||||
public class AEBaseItemBlockSlab extends ItemSlab {
|
|
||||||
|
|
||||||
public AEBaseItemBlockSlab(Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab)
|
public class AEBaseItemBlockSlab extends ItemSlab
|
||||||
|
{
|
||||||
|
|
||||||
|
public AEBaseItemBlockSlab( Block block, AEBaseSlabBlock singleSlab, AEBaseSlabBlock doubleSlab, Boolean isDoubleSlab )
|
||||||
{
|
{
|
||||||
super( block, singleSlab, doubleSlab, isDoubleSlab );
|
super( block, singleSlab, doubleSlab, isDoubleSlab );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -56,21 +56,22 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
|||||||
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
|
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
|
||||||
this.setStepSound( block.stepSound );
|
this.setStepSound( block.stepSound );
|
||||||
this.useNeighborBrightness = true;
|
this.useNeighborBrightness = true;
|
||||||
if (!field_150004_a) this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs(this);
|
if( !field_150004_a )
|
||||||
|
this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs( this );
|
||||||
this.features = !field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
this.features = !field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AEBaseSlabBlock setSlabs(AEBaseSlabBlock slabs)
|
public AEBaseSlabBlock setSlabs( AEBaseSlabBlock slabs )
|
||||||
{
|
{
|
||||||
this.slabs = slabs;
|
this.slabs = slabs;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AEBaseSlabBlock slabs()
|
public AEBaseSlabBlock slabs()
|
||||||
{
|
{
|
||||||
return slabs;
|
return slabs;
|
||||||
}
|
}
|
||||||
|
|
||||||
public AEBaseSlabBlock doubleSlabs()
|
public AEBaseSlabBlock doubleSlabs()
|
||||||
{
|
{
|
||||||
return doubleSlabs;
|
return doubleSlabs;
|
||||||
@@ -89,36 +90,40 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IIcon getIcon(int dir, int meta)
|
public IIcon getIcon( int dir, int meta )
|
||||||
{
|
{
|
||||||
return block.getIcon( dir, this.meta );
|
return block.getIcon( dir, this.meta );
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String func_150002_b(int p_150002_1_)
|
public String func_150002_b( int p_150002_1_ )
|
||||||
{
|
{
|
||||||
return this.getUnlocalizedName();
|
return this.getUnlocalizedName();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void registerBlockIcons(IIconRegister reg) { }
|
public void registerBlockIcons( IIconRegister reg )
|
||||||
|
|
||||||
@Override
|
|
||||||
public Item getItemDropped(int meta, Random rand, int fortune)
|
|
||||||
{
|
{
|
||||||
return this.field_150004_a ? Item.getItemFromBlock(this.slabs) : Item.getItemFromBlock(this);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getPickBlock(MovingObjectPosition target, World world, int x, int y, int z)
|
public Item getItemDropped( int meta, Random rand, int fortune )
|
||||||
{
|
{
|
||||||
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock(x, y, z);
|
return this.field_150004_a ? Item.getItemFromBlock( this.slabs ) : Item.getItemFromBlock( this );
|
||||||
|
}
|
||||||
|
|
||||||
if (block == null) return null;
|
@Override
|
||||||
if (block.field_150004_a) block = this.slabs;
|
public ItemStack getPickBlock( MovingObjectPosition target, World world, int x, int y, int z )
|
||||||
|
{
|
||||||
|
AEBaseSlabBlock block = (AEBaseSlabBlock) world.getBlock( x, y, z );
|
||||||
|
|
||||||
int meta = world.getBlockMetadata(x, y, z) & 7;
|
if( block == null )
|
||||||
return new ItemStack(block, 1, meta);
|
return null;
|
||||||
|
if( block.field_150004_a )
|
||||||
|
block = this.slabs;
|
||||||
|
|
||||||
|
int meta = world.getBlockMetadata( x, y, z ) & 7;
|
||||||
|
return new ItemStack( block, 1, meta );
|
||||||
}
|
}
|
||||||
|
|
||||||
public String name()
|
public String name()
|
||||||
|
|||||||
@@ -455,7 +455,8 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
|||||||
return this.cb( world, x, y, z ).recolourBlock( side, AEColor.values()[colour], who );
|
return this.cb( world, x, y, z ).recolourBlock( side, AEColor.values()[colour], who );
|
||||||
}
|
}
|
||||||
catch( Throwable ignored )
|
catch( Throwable ignored )
|
||||||
{}
|
{
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class OreQuartzCharged extends OreQuartz
|
|||||||
@Override
|
@Override
|
||||||
public int damageDropped( int id )
|
public int damageDropped( int id )
|
||||||
{
|
{
|
||||||
for ( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
for( ItemStack crystalStack : AEApi.instance().definitions().materials().certusQuartzCrystalCharged().maybeStack( 1 ).asSet() )
|
||||||
{
|
{
|
||||||
return crystalStack.getItemDamage();
|
return crystalStack.getItemDamage();
|
||||||
}
|
}
|
||||||
@@ -74,7 +74,7 @@ public class OreQuartzCharged extends OreQuartz
|
|||||||
@SideOnly( Side.CLIENT )
|
@SideOnly( Side.CLIENT )
|
||||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||||
{
|
{
|
||||||
if ( !AEConfig.instance.enableEffects )
|
if( !AEConfig.instance.enableEffects )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -394,7 +394,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class ButtonAppearance
|
private static class ButtonAppearance
|
||||||
{
|
{
|
||||||
public int index;
|
public int index;
|
||||||
|
|||||||
@@ -56,11 +56,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
|||||||
/**
|
/**
|
||||||
* Using itemstack as an icon
|
* Using itemstack as an icon
|
||||||
*
|
*
|
||||||
* @param x x pos of button
|
* @param x x pos of button
|
||||||
* @param y y pos of button
|
* @param y y pos of button
|
||||||
* @param ico used icon
|
* @param ico used icon
|
||||||
* @param message mouse over message
|
* @param message mouse over message
|
||||||
* @param ir renderer
|
* @param ir renderer
|
||||||
*/
|
*/
|
||||||
public GuiTabButton( int x, int y, ItemStack ico, String message, RenderItem ir )
|
public GuiTabButton( int x, int y, ItemStack ico, String message, RenderItem ir )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -45,10 +45,10 @@ public class MEGuiTextField extends GuiTextField
|
|||||||
* Pays attention to the '_' caret.
|
* Pays attention to the '_' caret.
|
||||||
*
|
*
|
||||||
* @param fontRenderer renderer for the strings
|
* @param fontRenderer renderer for the strings
|
||||||
* @param xPos absolute left position
|
* @param xPos absolute left position
|
||||||
* @param yPos absolute top position
|
* @param yPos absolute top position
|
||||||
* @param width absolute width
|
* @param width absolute width
|
||||||
* @param height absolute height
|
* @param height absolute height
|
||||||
*/
|
*/
|
||||||
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||||||
@Override
|
@Override
|
||||||
/**
|
/**
|
||||||
* Overridden super.setupConfig to prevent setting up the fake slots
|
* Overridden super.setupConfig to prevent setting up the fake slots
|
||||||
*/ protected void setupConfig()
|
*/protected void setupConfig()
|
||||||
{
|
{
|
||||||
this.setupUpgrades();
|
this.setupUpgrades();
|
||||||
}
|
}
|
||||||
@@ -127,10 +127,10 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
|||||||
for( IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
for( IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||||
{
|
{
|
||||||
boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
|
boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
|
||||||
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
||||||
|
|
||||||
boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orNull() ) ) && // and...
|
boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orNull() ) ) && // and...
|
||||||
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
||||||
|
|
||||||
if( matchA || matchB )
|
if( matchA || matchB )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ package appeng.container.slot;
|
|||||||
|
|
||||||
import net.minecraft.inventory.IInventory;
|
import net.minecraft.inventory.IInventory;
|
||||||
|
|
||||||
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
|
||||||
|
|
||||||
|
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
||||||
|
|
||||||
public class SlotPlayerInv extends AppEngSlot
|
public class SlotPlayerInv extends AppEngSlot
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -145,7 +145,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem)
|
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ?
|
||||||
|
// ((ICraftingPatternItem)
|
||||||
// i.getItem()).getPatternForItem( i ) : null;
|
// i.getItem()).getPatternForItem( i ) : null;
|
||||||
return false;// pattern != null;
|
return false;// pattern != null;
|
||||||
}
|
}
|
||||||
@@ -179,8 +180,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
|||||||
|
|
||||||
case INSCRIBER_INPUT:
|
case INSCRIBER_INPUT:
|
||||||
return true;/*
|
return true;/*
|
||||||
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return true;
|
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return
|
||||||
*
|
* true;
|
||||||
* return false;
|
* return false;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ public final class Api implements IAppEngApi
|
|||||||
@Override
|
@Override
|
||||||
public IGridNode createGridNode( IGridBlock blk )
|
public IGridNode createGridNode( IGridBlock blk )
|
||||||
{
|
{
|
||||||
if ( Platform.isClient() )
|
if( Platform.isClient() )
|
||||||
{
|
{
|
||||||
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -343,10 +343,10 @@ public final class Registration
|
|||||||
target.partCableCovered = source.cableCovered();
|
target.partCableCovered = source.cableCovered();
|
||||||
target.partCableGlass = source.cableGlass();
|
target.partCableGlass = source.cableGlass();
|
||||||
target.partCableDense = source.cableDense();
|
target.partCableDense = source.cableDense();
|
||||||
// target.partLumenCableSmart = source.lumenCableSmart();
|
// target.partLumenCableSmart = source.lumenCableSmart();
|
||||||
// target.partLumenCableCovered = source.lumenCableCovered();
|
// target.partLumenCableCovered = source.lumenCableCovered();
|
||||||
// target.partLumenCableGlass = source.lumenCableGlass();
|
// target.partLumenCableGlass = source.lumenCableGlass();
|
||||||
// target.partLumenCableDense = source.lumenCableDense();
|
// target.partLumenCableDense = source.lumenCableDense();
|
||||||
target.partQuartzFiber = this.converter.of( source.quartzFiber() );
|
target.partQuartzFiber = this.converter.of( source.quartzFiber() );
|
||||||
target.partToggleBus = this.converter.of( source.toggleBus() );
|
target.partToggleBus = this.converter.of( source.toggleBus() );
|
||||||
target.partInvertedToggleBus = this.converter.of( source.invertedToggleBus() );
|
target.partInvertedToggleBus = this.converter.of( source.invertedToggleBus() );
|
||||||
@@ -532,7 +532,7 @@ public final class Registration
|
|||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyReceiver" );
|
partHelper.registerNewLayer( "appeng.parts.layers.LayerIEnergyHandler", "cofh.api.energy.IEnergyReceiver" );
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
||||||
{
|
{
|
||||||
partHelper.registerNewLayer( "appeng.parts.layers.LayerSidedEnvironment", "li.cil.oc.api.network.SidedEnvironment" );
|
partHelper.registerNewLayer( "appeng.parts.layers.LayerSidedEnvironment", "li.cil.oc.api.network.SidedEnvironment" );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -241,14 +241,15 @@ public final class ApiBlocks implements IBlocks
|
|||||||
|
|
||||||
this.quartzPillarStair = constructor.registerBlockDefinition( new QuartzPillarStairBlock( quartzPillar ) );
|
this.quartzPillarStair = constructor.registerBlockDefinition( new QuartzPillarStairBlock( quartzPillar ) );
|
||||||
|
|
||||||
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSlabBlock" ) );
|
this.skyStoneSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneSlabBlock" ) );
|
||||||
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 1, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBlockSlabBlock" ) );
|
this.skyStoneBlockSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 1, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneBlockSlabBlock" ) );
|
||||||
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 2, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneBrickSlabBlock" ) );
|
this.skyStoneBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 2, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneBrickSlabBlock" ) );
|
||||||
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 3, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "SkyStoneSmallBrickSlabBlock" ) );
|
this.skyStoneSmallBrickSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( skyStone, 3, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "SkyStoneSmallBrickSlabBlock" ) );
|
||||||
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "FluixSlabBlock" ) );
|
this.fluixSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( fluixBlock, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "FluixSlabBlock" ) );
|
||||||
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzSlabBlock" ) );
|
this.quartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzBlock, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "QuartzSlabBlock" ) );
|
||||||
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "ChiseledQuartzSlabBlock" ) );;
|
this.chiseledQuartzSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( chiseledQuartz, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "ChiseledQuartzSlabBlock" ) );
|
||||||
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, 0, EnumSet.of(AEFeature.DecorativeQuartzBlocks), false, "QuartzPillarSlabBlock" ) );
|
;
|
||||||
|
this.quartzPillarSlab = constructor.registerBlockDefinition( new AEBaseSlabBlock( quartzPillar, 0, EnumSet.of( AEFeature.DecorativeQuartzBlocks ), false, "QuartzPillarSlabBlock" ) );
|
||||||
|
|
||||||
this.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
this.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
||||||
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ public class DefinitionConstructor
|
|||||||
|
|
||||||
if( definition instanceof ITileDefinition )
|
if( definition instanceof ITileDefinition )
|
||||||
{
|
{
|
||||||
return ( (ITileDefinition) definition );
|
return( (ITileDefinition) definition );
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalStateException( "No tile definition for " + feature );
|
throw new IllegalStateException( "No tile definition for " + feature );
|
||||||
@@ -66,7 +66,7 @@ public class DefinitionConstructor
|
|||||||
|
|
||||||
if( definition instanceof IBlockDefinition )
|
if( definition instanceof IBlockDefinition )
|
||||||
{
|
{
|
||||||
return ( (IBlockDefinition) definition );
|
return( (IBlockDefinition) definition );
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new IllegalStateException( "No block definition for " + feature );
|
throw new IllegalStateException( "No block definition for " + feature );
|
||||||
|
|||||||
@@ -18,35 +18,35 @@
|
|||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound in = new NBTTagCompound();
|
NBTTagCompound in = new NBTTagCompound();
|
||||||
NBTTagCompound out = new NBTTagCompound();
|
NBTTagCompound out = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||||
msg.setTag( "in", in );
|
msg.setTag( "in", in );
|
||||||
msg.setTag( "out", out );
|
msg.setTag( "out", out );
|
||||||
msg.setInteger( "turns", 8 );
|
msg.setInteger( "turns", 8 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||||
|
|
||||||
-- or --
|
-- or --
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound in = new NBTTagCompound();
|
NBTTagCompound in = new NBTTagCompound();
|
||||||
NBTTagCompound out = new NBTTagCompound();
|
NBTTagCompound out = new NBTTagCompound();
|
||||||
NBTTagCompound optional = new NBTTagCompound();
|
NBTTagCompound optional = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||||
msg.setTag( "in", in );
|
msg.setTag( "in", in );
|
||||||
msg.setTag( "out", out );
|
msg.setTag( "out", out );
|
||||||
msg.setTag( "optional", optional );
|
msg.setTag( "optional", optional );
|
||||||
msg.setFloat( "chance", 0.5 );
|
msg.setFloat( "chance", 0.5 );
|
||||||
msg.setInteger( "turns", 8 );
|
msg.setInteger( "turns", 8 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -18,14 +18,14 @@
|
|||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
NBTTagCompound msg = new NBTTagCompound();
|
NBTTagCompound msg = new NBTTagCompound();
|
||||||
NBTTagCompound item = new NBTTagCompound();
|
NBTTagCompound item = new NBTTagCompound();
|
||||||
|
|
||||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||||
msg.setTag( "item", item );
|
msg.setTag( "item", item );
|
||||||
msg.setDouble( "weight", 32.0 );
|
msg.setDouble( "weight", 32.0 );
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -18,12 +18,12 @@
|
|||||||
|
|
||||||
/* Example:
|
/* Example:
|
||||||
|
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", 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-bc-power", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-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-redstone", new ItemStack( myBlockOrItem ) );
|
||||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", 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-item", new ItemStack( myBlockOrItem ) );
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
/* Example:
|
/* 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;
|
package appeng.core.crash;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.crash;
|
package appeng.core.crash;
|
||||||
|
|
||||||
|
|
||||||
@@ -7,7 +8,7 @@ import appeng.core.AEConfig;
|
|||||||
public class ModCrashEnhancement extends BaseCrashEnhancement
|
public class ModCrashEnhancement extends BaseCrashEnhancement
|
||||||
{
|
{
|
||||||
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
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.minorVersion + '.' // minorVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ public enum AEFeature
|
|||||||
|
|
||||||
AEFeature( String cat )
|
AEFeature( String cat )
|
||||||
{
|
{
|
||||||
this(cat, true);
|
this( cat, true );
|
||||||
}
|
}
|
||||||
|
|
||||||
AEFeature( String cat, boolean defaultValue )
|
AEFeature( String cat, boolean defaultValue )
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.features;
|
package appeng.core.features;
|
||||||
|
|
||||||
|
|
||||||
@@ -92,7 +93,6 @@ public final class DefinitionConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class AEItem extends AEComparable
|
private static class AEItem extends AEComparable
|
||||||
{
|
{
|
||||||
private final IItemDefinition definition;
|
private final IItemDefinition definition;
|
||||||
@@ -119,7 +119,6 @@ public final class DefinitionConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class AEBlock extends AEItem
|
private static class AEBlock extends AEItem
|
||||||
{
|
{
|
||||||
private final IBlockDefinition definition;
|
private final IBlockDefinition definition;
|
||||||
@@ -145,7 +144,6 @@ public final class DefinitionConverter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static class AETile extends AEBlock
|
private static class AETile extends AEBlock
|
||||||
{
|
{
|
||||||
private final ITileDefinition definition;
|
private final ITileDefinition definition;
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
|||||||
{
|
{
|
||||||
final ActivityState state = new FeaturedActiveChecker( features ).getActivityState();
|
final ActivityState state = new FeaturedActiveChecker( features ).getActivityState();
|
||||||
this.slabs = slabs;
|
this.slabs = slabs;
|
||||||
this.extractor = new FeatureNameExtractor( slabs.getClass(), Optional.<String>absent());
|
this.extractor = new FeatureNameExtractor( slabs.getClass(), Optional.<String>absent() );
|
||||||
this.enabled = state == ActivityState.Enabled;
|
this.enabled = state == ActivityState.Enabled;
|
||||||
this.definition = new BlockDefinition( slabs, state );
|
this.definition = new BlockDefinition( slabs, state );
|
||||||
}
|
}
|
||||||
@@ -65,8 +65,8 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
|||||||
if( this.enabled )
|
if( this.enabled )
|
||||||
{
|
{
|
||||||
this.slabs.setCreativeTab( CreativeTab.instance );
|
this.slabs.setCreativeTab( CreativeTab.instance );
|
||||||
GameRegistry.registerBlock( slabs, AEBaseItemBlockSlab.class, "tile." + slabs.name(), slabs, slabs.doubleSlabs(), false);
|
GameRegistry.registerBlock( slabs, AEBaseItemBlockSlab.class, "tile." + slabs.name(), slabs, slabs.doubleSlabs(), false );
|
||||||
GameRegistry.registerBlock( slabs.doubleSlabs(), AEBaseItemBlockSlab.class, "tile." + slabs.name() + ".double", slabs, slabs.doubleSlabs(), true);
|
GameRegistry.registerBlock( slabs.doubleSlabs(), AEBaseItemBlockSlab.class, "tile." + slabs.name() + ".double", slabs, slabs.doubleSlabs(), true );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.features.registries.entries;
|
package appeng.core.features.registries.entries;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.core.features.registries.entries;
|
package appeng.core.features.registries.entries;
|
||||||
|
|
||||||
|
|
||||||
@@ -94,7 +95,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
|||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if( !(o instanceof IInscriberRecipe) )
|
if( !( o instanceof IInscriberRecipe ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -113,7 +114,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if( !this.maybeBot.equals( that.getBottomOptional()) )
|
if( !this.maybeBot.equals( that.getBottomOptional() ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public enum PlayerMessages
|
|||||||
isNowLocked, isNowUnlocked,
|
isNowLocked, isNowUnlocked,
|
||||||
AmmoDepleted,
|
AmmoDepleted,
|
||||||
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
||||||
SettingCleared,;
|
SettingCleared, ;
|
||||||
|
|
||||||
public IChatComponent get()
|
public IChatComponent get()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -38,20 +38,24 @@ import appeng.core.features.AEFeature;
|
|||||||
public class PlayerStatsRegistration
|
public class PlayerStatsRegistration
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* {@link cpw.mods.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the feature is enabled
|
* {@link cpw.mods.fml.common.eventhandler.EventBus} to which the handlers might get posted to depending if the
|
||||||
|
* feature is enabled
|
||||||
*/
|
*/
|
||||||
private final EventBus bus;
|
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;
|
private final boolean isAchievementFeatureEnabled;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructs this with an {@link cpw.mods.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
|
* Constructs this with an {@link cpw.mods.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
|
||||||
*
|
*
|
||||||
* @param bus {@see #bus}
|
* @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 config {@link appeng.core.AEConfig} which is used to determine if the
|
||||||
|
* {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||||
*/
|
*/
|
||||||
public PlayerStatsRegistration( EventBus bus, AEConfig config )
|
public PlayerStatsRegistration( EventBus bus, AEConfig config )
|
||||||
{
|
{
|
||||||
@@ -60,7 +64,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()
|
public void registerAchievementHandlers()
|
||||||
{
|
{
|
||||||
@@ -76,7 +82,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()
|
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>();
|
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
||||||
|
|
||||||
|
|
||||||
public enum PacketTypes
|
public enum PacketTypes
|
||||||
{
|
{
|
||||||
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ public final class PacketConfigButton extends AppEngPacket
|
|||||||
public void serverPacketData( INetworkInfo manager, AppEngPacket packet, EntityPlayer player )
|
public void serverPacketData( INetworkInfo manager, AppEngPacket packet, EntityPlayer player )
|
||||||
{
|
{
|
||||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||||
if ( sender.openContainer instanceof AEBaseContainer )
|
if( sender.openContainer instanceof AEBaseContainer )
|
||||||
{
|
{
|
||||||
final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||||
if( baseContainer.getTarget() instanceof IConfigurableObject )
|
if( baseContainer.getTarget() instanceof IConfigurableObject )
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public interface IWorldPlayerMapping
|
|||||||
/**
|
/**
|
||||||
* Put in new players when they join the server
|
* 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
|
* @param uuid UUID of new player
|
||||||
*/
|
*/
|
||||||
void put( int id, @Nonnull UUID uuid );
|
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 dimension ID of the processed dimension. Can be any integer
|
||||||
* @param chunkX X 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
|
* @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
|
* @since rv3 05.06.2015
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ class PlayerMappingsInitializer
|
|||||||
* where the UUIDs were introduced.
|
* where the UUIDs were introduced.
|
||||||
*
|
*
|
||||||
* @param playerList the category for the player list, generally extracted using the "players" tag
|
* @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
|
* @param log the logger used to warn the server or user of faulty entries
|
||||||
*/
|
*/
|
||||||
PlayerMappingsInitializer( ConfigCategory playerList, FMLRelaunchLog log )
|
PlayerMappingsInitializer( ConfigCategory playerList, FMLRelaunchLog log )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -57,7 +57,8 @@ final class SpawnData implements IWorldSpawnData
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setGenerated( int dim, int chunkX, int chunkZ ) {
|
public void setGenerated( int dim, int chunkX, int chunkZ )
|
||||||
|
{
|
||||||
synchronized( SpawnData.class )
|
synchronized( SpawnData.class )
|
||||||
{
|
{
|
||||||
NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
||||||
|
|||||||
@@ -536,23 +536,18 @@ public class FacadePart implements IFacadePart, IBoxProvider
|
|||||||
* if ( out.contains( ForgeDirection.EAST ) && (side.offsetZ != 0) ) { IFacadePart fp = fc.getFacade(
|
* if ( out.contains( ForgeDirection.EAST ) && (side.offsetZ != 0) ) { IFacadePart fp = fc.getFacade(
|
||||||
* ForgeDirection.EAST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
* ForgeDirection.EAST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||||
* ForgeDirection.EAST ); }
|
* ForgeDirection.EAST ); }
|
||||||
*
|
|
||||||
* if ( out.contains( ForgeDirection.WEST ) && (side.offsetZ != 0) ) { IFacadePart fp = fc.getFacade(
|
* if ( out.contains( ForgeDirection.WEST ) && (side.offsetZ != 0) ) { IFacadePart fp = fc.getFacade(
|
||||||
* ForgeDirection.WEST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
* ForgeDirection.WEST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||||
* ForgeDirection.WEST ); }
|
* ForgeDirection.WEST ); }
|
||||||
*
|
|
||||||
* if ( out.contains( ForgeDirection.NORTH ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
* if ( out.contains( ForgeDirection.NORTH ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||||
* ForgeDirection.NORTH ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
* ForgeDirection.NORTH ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||||
* ForgeDirection.NORTH ); }
|
* ForgeDirection.NORTH ); }
|
||||||
*
|
|
||||||
* if ( out.contains( ForgeDirection.SOUTH ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
* if ( out.contains( ForgeDirection.SOUTH ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||||
* ForgeDirection.SOUTH ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
* ForgeDirection.SOUTH ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||||
* ForgeDirection.SOUTH ); }
|
* ForgeDirection.SOUTH ); }
|
||||||
*
|
|
||||||
* if ( out.contains( ForgeDirection.EAST ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
* if ( out.contains( ForgeDirection.EAST ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||||
* ForgeDirection.EAST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
* ForgeDirection.EAST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||||
* ForgeDirection.EAST ); }
|
* ForgeDirection.EAST ); }
|
||||||
*
|
|
||||||
* if ( out.contains( ForgeDirection.WEST ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
* if ( out.contains( ForgeDirection.WEST ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||||
* ForgeDirection.WEST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
* ForgeDirection.WEST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||||
* ForgeDirection.WEST ); }
|
* ForgeDirection.WEST ); }
|
||||||
|
|||||||
@@ -453,7 +453,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IMask
|
|||||||
double r = Math.abs( a - 0.5 );
|
double r = Math.abs( a - 0.5 );
|
||||||
r = Math.max( Math.abs( b - 0.5 ), r );
|
r = Math.max( Math.abs( b - 0.5 ), r );
|
||||||
r = Math.max( Math.abs( c - 0.5 ), r );
|
r = Math.max( Math.abs( c - 0.5 ), r );
|
||||||
return ( 8 * (int) Math.max( Math.abs( d - 0.5 ), r ) );
|
return( 8 * (int) Math.max( Math.abs( d - 0.5 ), r ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
// @Override
|
||||||
|
|||||||
@@ -373,7 +373,6 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
|||||||
ACCEPT, DECLINE, TEST
|
ACCEPT, DECLINE, TEST
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static class TestLookup
|
static class TestLookup
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.helpers;
|
package appeng.helpers;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -317,7 +317,6 @@ public class TickHandler
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static class PlayerColor
|
public static class PlayerColor
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ public enum IntegrationType
|
|||||||
|
|
||||||
BuildCraftCore( IntegrationSide.BOTH, "BuildCraft Core", "BuildCraft|Core" ),
|
BuildCraftCore( IntegrationSide.BOTH, "BuildCraft Core", "BuildCraft|Core" ),
|
||||||
|
|
||||||
BuildCraftTransport( IntegrationSide.BOTH, "BuildCraft Transport", "BuildCraft|Transport"),
|
BuildCraftTransport( IntegrationSide.BOTH, "BuildCraft Transport", "BuildCraft|Transport" ),
|
||||||
|
|
||||||
BuildCraftBuilder( IntegrationSide.BOTH, "BuildCraft Builders", "BuildCraft|Builders"),
|
BuildCraftBuilder( IntegrationSide.BOTH, "BuildCraft Builders", "BuildCraft|Builders" ),
|
||||||
|
|
||||||
RF( IntegrationSide.BOTH, "RedstoneFlux Power - Tiles", "CoFHAPI" ),
|
RF( IntegrationSide.BOTH, "RedstoneFlux Power - Tiles", "CoFHAPI" ),
|
||||||
|
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ public interface IBuildCraftTransport
|
|||||||
IIcon getCobbleStructurePipeTexture();
|
IIcon getCobbleStructurePipeTexture();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param te the to be checked {@link TileEntity}
|
* @param te the to be checked {@link TileEntity}
|
||||||
* @param dir direction of the {@link TileEntity}
|
* @param dir direction of the {@link TileEntity}
|
||||||
*
|
*
|
||||||
* @return {@code true} if {@code te} is a buildcraft pipe, but not plugged
|
* @return {@code true} if {@code te} is a buildcraft pipe, but not plugged
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ public class BCPipeHandler implements IExternalStorageHandler
|
|||||||
@Override
|
@Override
|
||||||
public boolean canHandle( TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc )
|
public boolean canHandle( TileEntity te, ForgeDirection d, StorageChannel chan, BaseActionSource mySrc )
|
||||||
{
|
{
|
||||||
if ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
|
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.BuildCraftTransport ) )
|
||||||
{
|
{
|
||||||
final IBuildCraftTransport bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BuildCraftTransport );
|
final IBuildCraftTransport bc = (IBuildCraftTransport) IntegrationRegistry.INSTANCE.getInstance( IntegrationType.BuildCraftTransport );
|
||||||
|
|
||||||
|
|||||||
@@ -196,7 +196,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
|||||||
|
|
||||||
if( recipe.getOptionalOutput() != null )
|
if( recipe.getOptionalOutput() != null )
|
||||||
{
|
{
|
||||||
final int chancePercent = (int) (recipe.getOptionalChance() * 100);
|
final int chancePercent = (int) ( recipe.getOptionalChance() * 100 );
|
||||||
|
|
||||||
this.hasOptional = true;
|
this.hasOptional = true;
|
||||||
this.displayChance = String.format( GuiText.OfSecondOutput.getLocal(), chancePercent );
|
this.displayChance = String.format( GuiText.OfSecondOutput.getLocal(), chancePercent );
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package appeng.integration.modules;
|
package appeng.integration.modules;
|
||||||
|
|
||||||
|
|
||||||
import li.cil.oc.api.Items;
|
import li.cil.oc.api.Items;
|
||||||
|
|
||||||
import appeng.api.AEApi;
|
import appeng.api.AEApi;
|
||||||
@@ -25,6 +26,7 @@ import appeng.api.config.TunnelType;
|
|||||||
import appeng.api.features.IP2PTunnelRegistry;
|
import appeng.api.features.IP2PTunnelRegistry;
|
||||||
import appeng.integration.BaseModule;
|
import appeng.integration.BaseModule;
|
||||||
|
|
||||||
|
|
||||||
public class OpenComputers extends BaseModule
|
public class OpenComputers extends BaseModule
|
||||||
{
|
{
|
||||||
public static OpenComputers instance;
|
public static OpenComputers instance;
|
||||||
|
|||||||
@@ -54,8 +54,8 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Used cache for channels if the channel was not transmitted through the server.
|
* Used cache for channels if the channel was not transmitted through the server.
|
||||||
* <p/>
|
* <p/>
|
||||||
* This is useful, when a player just started to look at a tile
|
* This is useful, when a player just started to look at a tile and thus just requested the new information from the
|
||||||
* and thus just requested the new information from the server.
|
* server.
|
||||||
* <p/>
|
* <p/>
|
||||||
* The cache will be updated from the server.
|
* The cache will be updated from the server.
|
||||||
*/
|
*/
|
||||||
@@ -64,10 +64,10 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Adds the used and max channel to the tool tip
|
* Adds the used and max channel to the tool tip
|
||||||
*
|
*
|
||||||
* @param part being looked at part
|
* @param part being looked at part
|
||||||
* @param currentToolTip current tool tip
|
* @param currentToolTip current tool tip
|
||||||
* @param accessor wrapper for various world information
|
* @param accessor wrapper for various world information
|
||||||
* @param config config to react to various settings
|
* @param config config to react to various settings
|
||||||
*
|
*
|
||||||
* @return modified tool tip
|
* @return modified tool tip
|
||||||
*/
|
*/
|
||||||
@@ -91,12 +91,11 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Determines the source of the channel.
|
* Determines the source of the channel.
|
||||||
* <p/>
|
* <p/>
|
||||||
* If the client received information of the channels on the server, they are used,
|
* If the client received information of the channels on the server, they are used, else if the cache contains a
|
||||||
* else if the cache contains a previous stored value, this will be used.
|
* previous stored value, this will be used. Default value is 0.
|
||||||
* Default value is 0.
|
|
||||||
*
|
*
|
||||||
* @param part part to be looked at
|
* @param part part to be looked at
|
||||||
* @param tag tag maybe containing the channel information
|
* @param tag tag maybe containing the channel information
|
||||||
* @param cache cache with previous knowledge
|
* @param cache cache with previous knowledge
|
||||||
*
|
*
|
||||||
* @return used channels on the cable
|
* @return used channels on the cable
|
||||||
@@ -125,18 +124,17 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Called on server to transfer information from server to client.
|
* Called on server to transfer information from server to client.
|
||||||
* <p/>
|
* <p/>
|
||||||
* If the part is a cable,
|
* If the part is a cable, it writes the channel information in the {@code #tag} using the {@code ID_USED_CHANNELS}
|
||||||
* it writes the channel information in the {@code #tag}
|
* key.
|
||||||
* using the {@code ID_USED_CHANNELS} key.
|
|
||||||
*
|
*
|
||||||
* @param player player looking at the part
|
* @param player player looking at the part
|
||||||
* @param part part being looked at
|
* @param part part being looked at
|
||||||
* @param te host of the part
|
* @param te host of the part
|
||||||
* @param tag transferred tag which is send to the client
|
* @param tag transferred tag which is send to the client
|
||||||
* @param world world of the part
|
* @param world world of the part
|
||||||
* @param x x pos of the part
|
* @param x x pos of the part
|
||||||
* @param y y pos of the part
|
* @param y y pos of the part
|
||||||
* @param z z pos of the part
|
* @param z z pos of the part
|
||||||
*
|
*
|
||||||
* @return tag send to the client
|
* @return tag send to the client
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ import appeng.api.parts.IPart;
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An abstraction layer of the {@link appeng.integration.modules.waila.part.IPartWailaDataProvider} for {@link appeng.api.parts.IPart}.
|
* An abstraction layer of the {@link appeng.integration.modules.waila.part.IPartWailaDataProvider} for
|
||||||
|
* {@link appeng.api.parts.IPart}.
|
||||||
*
|
*
|
||||||
* @author thatsIch
|
* @author thatsIch
|
||||||
* @version rv2
|
* @version rv2
|
||||||
|
|||||||
@@ -42,10 +42,10 @@ public final class PartAccessor
|
|||||||
/**
|
/**
|
||||||
* Hits a {@link appeng.api.parts.IPartHost} with {@link net.minecraft.util.MovingObjectPosition}.
|
* Hits a {@link appeng.api.parts.IPartHost} with {@link net.minecraft.util.MovingObjectPosition}.
|
||||||
* <p/>
|
* <p/>
|
||||||
* You can derive the looked at {@link appeng.api.parts.IPart} by doing that.
|
* You can derive the looked at {@link appeng.api.parts.IPart} by doing that. If a facade is being looked at, it is
|
||||||
* If a facade is being looked at, it is defined as being absent.
|
* defined as being absent.
|
||||||
*
|
*
|
||||||
* @param te being looked at {@link net.minecraft.tileentity.TileEntity}
|
* @param te being looked at {@link net.minecraft.tileentity.TileEntity}
|
||||||
* @param mop type of ray-trace
|
* @param mop type of ray-trace
|
||||||
*
|
*
|
||||||
* @return maybe the looked at {@link appeng.api.parts.IPart}
|
* @return maybe the looked at {@link appeng.api.parts.IPart}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package appeng.integration.modules.waila.part;
|
package appeng.integration.modules.waila.part;
|
||||||
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
|
||||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||||
@@ -25,14 +26,16 @@ import mcp.mobius.waila.api.IWailaConfigHandler;
|
|||||||
import appeng.api.parts.IPart;
|
import appeng.api.parts.IPart;
|
||||||
import appeng.api.parts.PartItemStack;
|
import appeng.api.parts.PartItemStack;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Part ItemStack provider for WAILA
|
* Part ItemStack provider for WAILA
|
||||||
*
|
*
|
||||||
* @author TheJulianJES
|
* @author TheJulianJES
|
||||||
* @version rv2
|
* @version rv2
|
||||||
* @since rv2
|
* @since rv2
|
||||||
*/
|
*/
|
||||||
public class PartStackWailaDataProvider extends BasePartWailaDataProvider {
|
public class PartStackWailaDataProvider extends BasePartWailaDataProvider
|
||||||
|
{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ItemStack getWailaStack( IPart part, IWailaConfigHandler config, ItemStack partStack )
|
public ItemStack getWailaStack( IPart part, IWailaConfigHandler config, ItemStack partStack )
|
||||||
|
|||||||
+4
-4
@@ -41,10 +41,10 @@ public final class PowerStateWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Adds state to the tooltip
|
* Adds state to the tooltip
|
||||||
*
|
*
|
||||||
* @param part part with state
|
* @param part part with state
|
||||||
* @param currentToolTip to be added to tooltip
|
* @param currentToolTip to be added to tooltip
|
||||||
* @param accessor wrapper for various information
|
* @param accessor wrapper for various information
|
||||||
* @param config config settings
|
* @param config config settings
|
||||||
*
|
*
|
||||||
* @return modified tooltip
|
* @return modified tooltip
|
||||||
*/
|
*/
|
||||||
@@ -64,7 +64,7 @@ public final class PowerStateWailaDataProvider extends BasePartWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Gets the corresponding tool tip for different values of {@code #isActive} and {@code #isPowered}
|
* Gets the corresponding tool tip for different values of {@code #isActive} and {@code #isPowered}
|
||||||
*
|
*
|
||||||
* @param isActive if part is active
|
* @param isActive if part is active
|
||||||
* @param isPowered if part is powered
|
* @param isPowered if part is powered
|
||||||
*
|
*
|
||||||
* @return tooltip of the state
|
* @return tooltip of the state
|
||||||
|
|||||||
+3
-3
@@ -45,10 +45,10 @@ public final class StorageMonitorWailaDataProvider extends BasePartWailaDataProv
|
|||||||
* Displays the stack if present and if the monitor is locked.
|
* Displays the stack if present and if the monitor is locked.
|
||||||
* Can handle fluids and items.
|
* Can handle fluids and items.
|
||||||
*
|
*
|
||||||
* @param part maybe storage monitor
|
* @param part maybe storage monitor
|
||||||
* @param currentToolTip to be written to tooltip
|
* @param currentToolTip to be written to tooltip
|
||||||
* @param accessor information wrapper
|
* @param accessor information wrapper
|
||||||
* @param config config option
|
* @param config config option
|
||||||
*
|
*
|
||||||
* @return modified tooltip
|
* @return modified tooltip
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -40,11 +40,11 @@ public final class Tracer
|
|||||||
* Trace view of players to blocks.
|
* Trace view of players to blocks.
|
||||||
* Ignore all which are out of reach.
|
* Ignore all which are out of reach.
|
||||||
*
|
*
|
||||||
* @param world word of block
|
* @param world word of block
|
||||||
* @param player player viewing block
|
* @param player player viewing block
|
||||||
* @param x x pos of block
|
* @param x x pos of block
|
||||||
* @param y y pos of block
|
* @param y y pos of block
|
||||||
* @param z z pos of block
|
* @param z z pos of block
|
||||||
*
|
*
|
||||||
* @return trace movement. Can be null
|
* @return trace movement. Can be null
|
||||||
*/
|
*/
|
||||||
@@ -72,7 +72,7 @@ public final class Tracer
|
|||||||
Vec3 v = Vec3.createVectorHelper( player.posX, player.posY, player.posZ );
|
Vec3 v = Vec3.createVectorHelper( player.posX, player.posY, player.posZ );
|
||||||
if( player.worldObj.isRemote )
|
if( player.worldObj.isRemote )
|
||||||
{
|
{
|
||||||
//compatibility with eye height changing mods
|
// compatibility with eye height changing mods
|
||||||
v.yCoord += player.getEyeHeight() - player.getDefaultEyeHeight();
|
v.yCoord += player.getEyeHeight() - player.getDefaultEyeHeight();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -46,10 +46,10 @@ public final class ChargerWailaDataProvider extends BaseWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Displays the holding item and its tooltip
|
* Displays the holding item and its tooltip
|
||||||
*
|
*
|
||||||
* @param itemStack stack of charger
|
* @param itemStack stack of charger
|
||||||
* @param currentToolTip unmodified tooltip
|
* @param currentToolTip unmodified tooltip
|
||||||
* @param accessor wrapper information
|
* @param accessor wrapper information
|
||||||
* @param config config option
|
* @param config config option
|
||||||
*
|
*
|
||||||
* @return modified tooltip
|
* @return modified tooltip
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-3
@@ -45,10 +45,10 @@ public final class CraftingMonitorWailaDataProvider extends BaseWailaDataProvide
|
|||||||
/**
|
/**
|
||||||
* Displays the item currently crafted by the CPU cluster
|
* Displays the item currently crafted by the CPU cluster
|
||||||
*
|
*
|
||||||
* @param itemStack stack of crafting monitor
|
* @param itemStack stack of crafting monitor
|
||||||
* @param currentToolTip unmodified tooltip
|
* @param currentToolTip unmodified tooltip
|
||||||
* @param accessor information wrapper
|
* @param accessor information wrapper
|
||||||
* @param config config option
|
* @param config config option
|
||||||
*
|
*
|
||||||
* @return modified tooltip
|
* @return modified tooltip
|
||||||
*/
|
*/
|
||||||
|
|||||||
+3
-3
@@ -44,10 +44,10 @@ public final class PowerStateWailaDataProvider extends BaseWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Adds state to the tooltip
|
* Adds state to the tooltip
|
||||||
*
|
*
|
||||||
* @param itemStack stack of power state
|
* @param itemStack stack of power state
|
||||||
* @param currentToolTip to be added to tooltip
|
* @param currentToolTip to be added to tooltip
|
||||||
* @param accessor wrapper for various information
|
* @param accessor wrapper for various information
|
||||||
* @param config config settings
|
* @param config config settings
|
||||||
*
|
*
|
||||||
* @return modified tooltip
|
* @return modified tooltip
|
||||||
*/
|
*/
|
||||||
|
|||||||
+18
-20
@@ -56,8 +56,8 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Used cache for power if the power was not transmitted through the server.
|
* Used cache for power if the power was not transmitted through the server.
|
||||||
* <p/>
|
* <p/>
|
||||||
* This is useful, when a player just started to look at a tile
|
* This is useful, when a player just started to look at a tile and thus just requested the new information from the
|
||||||
* and thus just requested the new information from the server.
|
* server.
|
||||||
* <p/>
|
* <p/>
|
||||||
* The cache will be updated from the server.
|
* The cache will be updated from the server.
|
||||||
*/
|
*/
|
||||||
@@ -67,18 +67,18 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
|||||||
* Adds the current and max power to the tool tip
|
* Adds the current and max power to the tool tip
|
||||||
* Will ignore if the tile has an energy buffer ( > 0 )
|
* Will ignore if the tile has an energy buffer ( > 0 )
|
||||||
*
|
*
|
||||||
* @param itemStack stack of power storage
|
* @param itemStack stack of power storage
|
||||||
* @param currentToolTip current tool tip
|
* @param currentToolTip current tool tip
|
||||||
* @param accessor wrapper for various world information
|
* @param accessor wrapper for various world information
|
||||||
* @param config config to react to various settings
|
* @param config config to react to various settings
|
||||||
*
|
*
|
||||||
* @return modified tool tip
|
* @return modified tool tip
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<String> getWailaBody( ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
|
public List<String> getWailaBody( ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
|
||||||
{
|
{
|
||||||
//Removes RF tooltip on WAILA 1.5.9+
|
// Removes RF tooltip on WAILA 1.5.9+
|
||||||
((ITaggedList<String, String>) currentToolTip).removeEntries("RFEnergyStorage");
|
( (ITaggedList<String, String>) currentToolTip ).removeEntries( "RFEnergyStorage" );
|
||||||
|
|
||||||
final TileEntity te = accessor.getTileEntity();
|
final TileEntity te = accessor.getTileEntity();
|
||||||
if( te instanceof IAEPowerStorage )
|
if( te instanceof IAEPowerStorage )
|
||||||
@@ -106,17 +106,16 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Called on server to transfer information from server to client.
|
* Called on server to transfer information from server to client.
|
||||||
* <p/>
|
* <p/>
|
||||||
* If the {@link net.minecraft.tileentity.TileEntity} is a {@link appeng.api.networking.energy.IAEPowerStorage},
|
* If the {@link net.minecraft.tileentity.TileEntity} is a {@link appeng.api.networking.energy.IAEPowerStorage}, it
|
||||||
* it writes the power information to the {@code #tag}
|
* writes the power information to the {@code #tag} using the {@code #ID_CURRENT_POWER} key.
|
||||||
* using the {@code #ID_CURRENT_POWER} key.
|
|
||||||
*
|
*
|
||||||
* @param player player looking at the power storage
|
* @param player player looking at the power storage
|
||||||
* @param te power storage
|
* @param te power storage
|
||||||
* @param tag transferred tag which is send to the client
|
* @param tag transferred tag which is send to the client
|
||||||
* @param world world of the power storage
|
* @param world world of the power storage
|
||||||
* @param x x pos of the power storage
|
* @param x x pos of the power storage
|
||||||
* @param y y pos of the power storage
|
* @param y y pos of the power storage
|
||||||
* @param z z pos of the power storage
|
* @param z z pos of the power storage
|
||||||
*
|
*
|
||||||
* @return tag send to the client
|
* @return tag send to the client
|
||||||
*/
|
*/
|
||||||
@@ -141,11 +140,10 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
|||||||
/**
|
/**
|
||||||
* Determines the current power.
|
* Determines the current power.
|
||||||
* <p/>
|
* <p/>
|
||||||
* If the client received power information on the server, they are used,
|
* If the client received power information on the server, they are used, else if the cache contains a previous
|
||||||
* else if the cache contains a previous stored value, this will be used.
|
* stored value, this will be used. Default value is 0.
|
||||||
* Default value is 0.
|
|
||||||
*
|
*
|
||||||
* @param te te to be looked at
|
* @param te te to be looked at
|
||||||
* @param tag tag maybe containing the channel information
|
* @param tag tag maybe containing the channel information
|
||||||
*
|
*
|
||||||
* @return used channels on the cable
|
* @return used channels on the cable
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ public final class ItemMultiMaterial extends AEBaseItem implements IStorageCompo
|
|||||||
Preconditions.checkState( !mat.isRegistered(), "Cannot create the same material twice." );
|
Preconditions.checkState( !mat.isRegistered(), "Cannot create the same material twice." );
|
||||||
|
|
||||||
boolean enabled = true;
|
boolean enabled = true;
|
||||||
|
|
||||||
for( AEFeature f : mat.getFeature() )
|
for( AEFeature f : mat.getFeature() )
|
||||||
{
|
{
|
||||||
enabled = enabled && AEConfig.instance.isFeatureEnabled( f );
|
enabled = enabled && AEConfig.instance.isFeatureEnabled( f );
|
||||||
@@ -190,7 +190,6 @@ public final class ItemMultiMaterial extends AEBaseItem implements IStorageCompo
|
|||||||
mat.markReady();
|
mat.markReady();
|
||||||
int newMaterialNum = mat.damageValue;
|
int newMaterialNum = mat.damageValue;
|
||||||
|
|
||||||
|
|
||||||
if( this.dmgToMaterial.get( newMaterialNum ) == null )
|
if( this.dmgToMaterial.get( newMaterialNum ) == null )
|
||||||
{
|
{
|
||||||
this.dmgToMaterial.put( newMaterialNum, mat );
|
this.dmgToMaterial.put( newMaterialNum, mat );
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package appeng.items.tools.powered.powersink;
|
package appeng.items.tools.powered.powersink;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@Interface(iface = "universalelectricity.core.item.IItemElectric", modid = "IC2")
|
@Interface(iface = "universalelectricity.core.item.IItemElectric", modid = "IC2")
|
||||||
public class UniversalElectricity extends ThermalExpansion implements IItemElectric
|
public class UniversalElectricity extends ThermalExpansion implements IItemElectric
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ import appeng.api.networking.IGridNode;
|
|||||||
/**
|
/**
|
||||||
* Nested iterator for {@link appeng.me.MachineSet}
|
* Nested iterator for {@link appeng.me.MachineSet}
|
||||||
*
|
*
|
||||||
* Traverses first over the {@link appeng.me.MachineSet}
|
* Traverses first over the {@link appeng.me.MachineSet} and then over every containing
|
||||||
* and then over every containing {@link appeng.api.networking.IGridNode}
|
* {@link appeng.api.networking.IGridNode}
|
||||||
*/
|
*/
|
||||||
public class GridNodeIterator implements Iterator<IGridNode>
|
public class GridNodeIterator implements Iterator<IGridNode>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -43,12 +43,13 @@ public class GridStorage implements IGridStorage
|
|||||||
private final WeakHashMap<GridStorage, Boolean> divided = new WeakHashMap<GridStorage, Boolean>();
|
private final WeakHashMap<GridStorage, Boolean> divided = new WeakHashMap<GridStorage, Boolean>();
|
||||||
public boolean isDirty = false;
|
public boolean isDirty = false;
|
||||||
private WeakReference<IGrid> internalGrid = null;
|
private WeakReference<IGrid> internalGrid = null;
|
||||||
|
|
||||||
// lost...
|
// lost...
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* for use with world settings
|
* for use with world settings
|
||||||
*
|
*
|
||||||
* @param id ID of grid storage
|
* @param id ID of grid storage
|
||||||
* @param gss grid storage search
|
* @param gss grid storage search
|
||||||
*/
|
*/
|
||||||
public GridStorage( long id, GridStorageSearch gss )
|
public GridStorage( long id, GridStorageSearch gss )
|
||||||
@@ -62,8 +63,8 @@ public class GridStorage implements IGridStorage
|
|||||||
* for use with world settings
|
* for use with world settings
|
||||||
*
|
*
|
||||||
* @param input array of bytes string
|
* @param input array of bytes string
|
||||||
* @param id ID of grid storage
|
* @param id ID of grid storage
|
||||||
* @param gss grid storage search
|
* @param gss grid storage search
|
||||||
*/
|
*/
|
||||||
public GridStorage( String input, long id, GridStorageSearch gss )
|
public GridStorage( String input, long id, GridStorageSearch gss )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -162,7 +162,6 @@ public class NetworkEventBus
|
|||||||
private static final long serialVersionUID = -3079021487019171205L;
|
private static final long serialVersionUID = -3079021487019171205L;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class EventMethod
|
class EventMethod
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -199,7 +198,6 @@ public class NetworkEventBus
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class MENetworkEventInfo
|
class MENetworkEventInfo
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -380,7 +380,6 @@ public class GridStorageCache implements IStorageGrid
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private class CellChangeTracker
|
private class CellChangeTracker
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
+3
-3
@@ -141,14 +141,14 @@ public class SecurityCache implements ISecurityGrid
|
|||||||
public void populateGridStorage( IGridStorage destinationStorage )
|
public void populateGridStorage( IGridStorage destinationStorage )
|
||||||
{
|
{
|
||||||
|
|
||||||
} @Override
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public boolean isAvailable()
|
public boolean isAvailable()
|
||||||
{
|
{
|
||||||
return this.securityProvider.size() == 1 && this.securityProvider.get( 0 ).isSecurityEnabled();
|
return this.securityProvider.size() == 1 && this.securityProvider.get( 0 ).isSecurityEnabled();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean hasPermission( EntityPlayer player, SecurityPermissions perm )
|
public boolean hasPermission( EntityPlayer player, SecurityPermissions perm )
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -56,7 +56,7 @@ public class TickTracker implements Comparable<TickTracker>
|
|||||||
|
|
||||||
public long getAvgNanos()
|
public long getAvgNanos()
|
||||||
{
|
{
|
||||||
return ( this.LastFiveTicksTime / 5 );
|
return( this.LastFiveTicksTime / 5 );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRate( int rate )
|
public void setRate( int rate )
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ public abstract class MBCalculator
|
|||||||
/**
|
/**
|
||||||
* construct the correct cluster, usually very simple.
|
* construct the correct cluster, usually very simple.
|
||||||
*
|
*
|
||||||
* @param w world
|
* @param w world
|
||||||
* @param min min world coord
|
* @param min min world coord
|
||||||
* @param max max world coord
|
* @param max max world coord
|
||||||
*
|
*
|
||||||
@@ -171,8 +171,8 @@ public abstract class MBCalculator
|
|||||||
/**
|
/**
|
||||||
* configure the multi-block tiles, most of the important stuff is in here.
|
* configure the multi-block tiles, most of the important stuff is in here.
|
||||||
*
|
*
|
||||||
* @param c updated cluster
|
* @param c updated cluster
|
||||||
* @param w in world
|
* @param w in world
|
||||||
* @param min min world coord
|
* @param min min world coord
|
||||||
* @param max max world coord
|
* @param max max world coord
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ public class CellInventory implements ICellInventory
|
|||||||
}
|
}
|
||||||
|
|
||||||
// clean any old crusty stuff...
|
// clean any old crusty stuff...
|
||||||
for(; x < oldStoredItems && x < this.maxItemTypes; x++ )
|
for( ; x < oldStoredItems && x < this.maxItemTypes; x++ )
|
||||||
{
|
{
|
||||||
this.tagCompound.removeTag( itemSlots[x] );
|
this.tagCompound.removeTag( itemSlots[x] );
|
||||||
this.tagCompound.removeTag( itemSlotCount[x] );
|
this.tagCompound.removeTag( itemSlotCount[x] );
|
||||||
|
|||||||
@@ -69,7 +69,9 @@ public class NetworkInventoryHandler<T extends IAEStack<T>> implements IMEInvent
|
|||||||
{
|
{
|
||||||
this.myChannel = chan;
|
this.myChannel = chan;
|
||||||
this.security = security;
|
this.security = security;
|
||||||
this.priorityInventory = new TreeMap<Integer, List<IMEInventoryHandler<T>>>( PRIORITY_SORTER ); // TreeMultimap.create( prioritySorter, hashSorter );
|
this.priorityInventory = new TreeMap<Integer, List<IMEInventoryHandler<T>>>( PRIORITY_SORTER ); // TreeMultimap.create(
|
||||||
|
// prioritySorter,
|
||||||
|
// hashSorter );
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addNewStorage( IMEInventoryHandler<T> h )
|
public void addNewStorage( IMEInventoryHandler<T> h )
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.parts.automation;
|
package appeng.parts.automation;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.parts.automation;
|
package appeng.parts.automation;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -508,10 +508,10 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
|||||||
{
|
{
|
||||||
|
|
||||||
is.stackSize = (int) maxStorage;
|
is.stackSize = (int) maxStorage;
|
||||||
EntityItem ei = new EntityItem( w, // w
|
EntityItem ei = new EntityItem( w,
|
||||||
( ( side.offsetX != 0 ? 0.0 : 0.7 ) * ( Platform.getRandomFloat() - 0.5f ) ) + 0.5 + side.offsetX * -0.3 + x, // spawn
|
( ( side.offsetX != 0 ? 0.0 : 0.7 ) * ( Platform.getRandomFloat() - 0.5f ) ) + 0.5 + side.offsetX * -0.3 + x,
|
||||||
( ( side.offsetY != 0 ? 0.0 : 0.7 ) * ( Platform.getRandomFloat() - 0.5f ) ) + 0.5 + side.offsetY * -0.3 + y, // spawn
|
( ( side.offsetY != 0 ? 0.0 : 0.7 ) * ( Platform.getRandomFloat() - 0.5f ) ) + 0.5 + side.offsetY * -0.3 + y,
|
||||||
( ( side.offsetZ != 0 ? 0.0 : 0.7 ) * ( Platform.getRandomFloat() - 0.5f ) ) + 0.5 + side.offsetZ * -0.3 + z, // spawn
|
( ( side.offsetZ != 0 ? 0.0 : 0.7 ) * ( Platform.getRandomFloat() - 0.5f ) ) + 0.5 + side.offsetZ * -0.3 + z,
|
||||||
is.copy() );
|
is.copy() );
|
||||||
|
|
||||||
Entity result = ei;
|
Entity result = ei;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.parts.automation;
|
package appeng.parts.automation;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
|
|
||||||
package appeng.parts.layers;
|
package appeng.parts.layers;
|
||||||
|
|
||||||
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import net.minecraftforge.common.util.ForgeDirection;
|
import net.minecraftforge.common.util.ForgeDirection;
|
||||||
@@ -41,10 +42,10 @@ public class LayerSidedEnvironment extends LayerBase implements SidedEnvironment
|
|||||||
{
|
{
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Node sidedNode(ForgeDirection side)
|
public Node sidedNode( ForgeDirection side )
|
||||||
{
|
{
|
||||||
final IPart part = this.getPart( side );
|
final IPart part = this.getPart( side );
|
||||||
if ( part instanceof SidedEnvironment )
|
if( part instanceof SidedEnvironment )
|
||||||
{
|
{
|
||||||
return ( (SidedEnvironment) part ).sidedNode( side );
|
return ( (SidedEnvironment) part ).sidedNode( side );
|
||||||
}
|
}
|
||||||
@@ -52,10 +53,10 @@ public class LayerSidedEnvironment extends LayerBase implements SidedEnvironment
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canConnect(ForgeDirection side)
|
public boolean canConnect( ForgeDirection side )
|
||||||
{
|
{
|
||||||
final IPart part = this.getPart( side );
|
final IPart part = this.getPart( side );
|
||||||
if ( part instanceof SidedEnvironment )
|
if( part instanceof SidedEnvironment )
|
||||||
{
|
{
|
||||||
return ( (SidedEnvironment) part ).canConnect( side );
|
return ( (SidedEnvironment) part ).canConnect( side );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -368,33 +368,32 @@ public class PartDenseCable extends PartCable
|
|||||||
boolean isGlass = false;
|
boolean isGlass = false;
|
||||||
AEColor myColor = this.getCableColor();
|
AEColor myColor = this.getCableColor();
|
||||||
/*
|
/*
|
||||||
* ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.GLASS && partHost.getPart(
|
* ( ghh != null && partHost != null && ghh.getCableConnectionType( of ) == AECableType.GLASS &&
|
||||||
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = partHost.getColor() ) );
|
* partHost.getPart(
|
||||||
|
* of.getOpposite() ) == null ) { isGlass = true; rh.setTexture( getGlassTexture( myColor = partHost.getColor()
|
||||||
|
* ) );
|
||||||
* } else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
|
* } else if ( partHost == null && ghh != null && ghh.getCableConnectionType( of ) != AECableType.GLASS ) {
|
||||||
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN: rh.setBounds( 3, 0, 3, 13, 4, 13 );
|
* rh.setTexture( getSmartTexture( myColor ) ); switch (of) { case DOWN: rh.setBounds( 3, 0, 3, 13, 4, 13 );
|
||||||
* break; case EAST: rh.setBounds( 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13, 13, 4
|
* break; case EAST: rh.setBounds( 12, 3, 3, 16, 13, 13 ); break; case NORTH: rh.setBounds( 3, 3, 0, 13, 13, 4
|
||||||
* ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 ); break; case UP: rh.setBounds( 3, 12, 3, 13, 16,
|
* ); break; case SOUTH: rh.setBounds( 3, 3, 12, 13, 13, 16 ); break; case UP: rh.setBounds( 3, 12, 3, 13, 16,
|
||||||
* 13 ); break; case WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; } rh.renderBlock( x, y,
|
* 13 ); break; case WEST: rh.setBounds( 0, 3, 3, 4, 13, 13 ); break; default: return; } rh.renderBlock( x, y,
|
||||||
* z, renderer );
|
* z, renderer );
|
||||||
*
|
|
||||||
* if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon firstIcon = new TaughtIcon( getChannelTex(
|
* if ( true ) { setSmartConnectionRotations( of, renderer ); IIcon firstIcon = new TaughtIcon( getChannelTex(
|
||||||
* channels, false ).getIcon(), -0.2f ); IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true ).getIcon(),
|
* channels, false ).getIcon(), -0.2f ); IIcon secondIcon = new TaughtIcon( getChannelTex( channels, true
|
||||||
|
* ).getIcon(),
|
||||||
* -0.2f );
|
* -0.2f );
|
||||||
*
|
|
||||||
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { AEBaseBlock blk = (AEBaseBlock)
|
* if ( of == ForgeDirection.EAST || of == ForgeDirection.WEST ) { AEBaseBlock blk = (AEBaseBlock)
|
||||||
* rh.getBlock(); FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST ); ico.setFlip(
|
* rh.getBlock(); FlippableIcon ico = blk.getRendererInstance().getTexture( ForgeDirection.EAST ); ico.setFlip(
|
||||||
* false, true ); }
|
* false, true ); }
|
||||||
*
|
|
||||||
* Tessellator.INSTANCE.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.INSTANCE.setColorOpaque_I(
|
* Tessellator.INSTANCE.setBrightness( 15 << 20 | 15 << 5 ); Tessellator.INSTANCE.setColorOpaque_I(
|
||||||
* myColor.mediumVariant ); rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon ); renderAllFaces( (AEBaseBlock)
|
* myColor.mediumVariant ); rh.setTexture( firstIcon, firstIcon, firstIcon, firstIcon, firstIcon, firstIcon );
|
||||||
|
* renderAllFaces( (AEBaseBlock)
|
||||||
* rh.getBlock(), x, y, z, renderer );
|
* rh.getBlock(), x, y, z, renderer );
|
||||||
*
|
* Tessellator.INSTANCE.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon,
|
||||||
* Tessellator.INSTANCE.setColorOpaque_I( myColor.whiteVariant ); rh.setTexture( secondIcon, secondIcon, secondIcon, secondIcon, secondIcon,
|
* secondIcon, secondIcon, secondIcon,
|
||||||
* secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
* secondIcon ); renderAllFaces( (AEBaseBlock) rh.getBlock(), x, y, z, renderer );
|
||||||
*
|
|
||||||
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
|
* renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth =
|
||||||
* renderer.uvRotateTop = renderer.uvRotateWest = 0; }
|
* renderer.uvRotateTop = renderer.uvRotateWest = 0; }
|
||||||
*
|
|
||||||
* rh.setTexture( getTexture( getCableColor() ) ); }
|
* rh.setTexture( getTexture( getCableColor() ) ); }
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import appeng.transformer.annotations.Integration.Interface;
|
|||||||
import appeng.transformer.annotations.Integration.InterfaceList;
|
import appeng.transformer.annotations.Integration.InterfaceList;
|
||||||
|
|
||||||
|
|
||||||
@InterfaceList(value = { @Interface(iface = "li.cil.oc.api.network.Environment", iname = "OpenComputers"), @Interface(iface = "li.cil.oc.api.network.SidedEnvironment", iname = "OpenComputers") })
|
@InterfaceList( value = { @Interface( iface = "li.cil.oc.api.network.Environment", iname = "OpenComputers" ), @Interface( iface = "li.cil.oc.api.network.SidedEnvironment", iname = "OpenComputers" ) } )
|
||||||
public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenComputers> implements IGridTickable, Environment, SidedEnvironment
|
public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenComputers> implements IGridTickable, Environment, SidedEnvironment
|
||||||
{
|
{
|
||||||
@Nullable
|
@Nullable
|
||||||
@@ -62,17 +62,17 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
|
|
||||||
private final Callable<Void> updateCallback;
|
private final Callable<Void> updateCallback;
|
||||||
|
|
||||||
public PartP2POpenComputers(ItemStack is)
|
public PartP2POpenComputers( ItemStack is )
|
||||||
{
|
{
|
||||||
super( is );
|
super( is );
|
||||||
|
|
||||||
if ( !IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
if( !IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
||||||
{
|
{
|
||||||
throw new RuntimeException( "OpenComputers is not installed!" );
|
throw new RuntimeException( "OpenComputers is not installed!" );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Avoid NPE when called in pre-init phase (part population).
|
// Avoid NPE when called in pre-init phase (part population).
|
||||||
if ( API.network != null )
|
if( API.network != null )
|
||||||
{
|
{
|
||||||
this.node = Network.newNode( this, Visibility.None ).create();
|
this.node = Network.newNode( this, Visibility.None ).create();
|
||||||
}
|
}
|
||||||
@@ -85,7 +85,7 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly( Side.CLIENT )
|
||||||
public IIcon getTypeTexture()
|
public IIcon getTypeTexture()
|
||||||
{
|
{
|
||||||
return Items.get( "adapter" ).block().getBlockTextureFromSide( 2 );
|
return Items.get( "adapter" ).block().getBlockTextureFromSide( 2 );
|
||||||
@@ -95,7 +95,7 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
public void removeFromWorld()
|
public void removeFromWorld()
|
||||||
{
|
{
|
||||||
super.removeFromWorld();
|
super.removeFromWorld();
|
||||||
if ( this.node != null)
|
if( this.node != null )
|
||||||
{
|
{
|
||||||
this.node.remove();
|
this.node.remove();
|
||||||
}
|
}
|
||||||
@@ -116,20 +116,20 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void readFromNBT(NBTTagCompound data)
|
public void readFromNBT( NBTTagCompound data )
|
||||||
{
|
{
|
||||||
super.readFromNBT( data );
|
super.readFromNBT( data );
|
||||||
if ( this.node != null)
|
if( this.node != null )
|
||||||
{
|
{
|
||||||
this.node.load( data );
|
this.node.load( data );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void writeToNBT(NBTTagCompound data)
|
public void writeToNBT( NBTTagCompound data )
|
||||||
{
|
{
|
||||||
super.writeToNBT( data );
|
super.writeToNBT( data );
|
||||||
if ( this.node != null)
|
if( this.node != null )
|
||||||
{
|
{
|
||||||
this.node.save( data );
|
this.node.save( data );
|
||||||
}
|
}
|
||||||
@@ -148,7 +148,7 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
{
|
{
|
||||||
if( !this.proxy.getPath().isNetworkBooting() )
|
if( !this.proxy.getPath().isNetworkBooting() )
|
||||||
{
|
{
|
||||||
if ( this.node() != null ) // Client side doesn't have nodes.
|
if( this.node() != null ) // Client side doesn't have nodes.
|
||||||
{
|
{
|
||||||
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.updateCallback );
|
TickHandler.INSTANCE.addCallable( this.tile.getWorldObj(), this.updateCallback );
|
||||||
}
|
}
|
||||||
@@ -166,14 +166,14 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
|
|
||||||
private void updateConnections()
|
private void updateConnections()
|
||||||
{
|
{
|
||||||
if ( this.proxy.isPowered() && this.proxy.isActive() )
|
if( this.proxy.isPowered() && this.proxy.isActive() )
|
||||||
{
|
{
|
||||||
// Make sure we're connected to existing OC nodes in the world.
|
// Make sure we're connected to existing OC nodes in the world.
|
||||||
Network.joinOrCreateNetwork( this.getTile() );
|
Network.joinOrCreateNetwork( this.getTile() );
|
||||||
|
|
||||||
if ( this.output )
|
if( this.output )
|
||||||
{
|
{
|
||||||
if ( this.getInput() != null && this.node != null )
|
if( this.getInput() != null && this.node != null )
|
||||||
{
|
{
|
||||||
Network.joinOrCreateNetwork( this.getInput().getTile() );
|
Network.joinOrCreateNetwork( this.getInput().getTile() );
|
||||||
this.node.connect( this.getInput().node() );
|
this.node.connect( this.getInput().node() );
|
||||||
@@ -183,22 +183,22 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
for ( PartP2POpenComputers output : this.getOutputs() )
|
for( PartP2POpenComputers output : this.getOutputs() )
|
||||||
{
|
{
|
||||||
if ( this.node != null )
|
if( this.node != null )
|
||||||
{
|
{
|
||||||
Network.joinOrCreateNetwork( output.getTile() );
|
Network.joinOrCreateNetwork( output.getTile() );
|
||||||
this.node.connect( output.node() );
|
this.node.connect( output.node() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch ( GridAccessException e )
|
catch( GridAccessException e )
|
||||||
{
|
{
|
||||||
AELog.error( e );
|
AELog.error( e );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( this.node != null )
|
else if( this.node != null )
|
||||||
{
|
{
|
||||||
this.node.remove();
|
this.node.remove();
|
||||||
}
|
}
|
||||||
@@ -212,26 +212,29 @@ public final class PartP2POpenComputers extends PartP2PTunnel<PartP2POpenCompute
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConnect(Node node) {
|
public void onConnect( Node node )
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDisconnect(Node node) {
|
public void onDisconnect( Node node )
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onMessage(Message message) {
|
public void onMessage( Message message )
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
@Override
|
@Override
|
||||||
public Node sidedNode(ForgeDirection side)
|
public Node sidedNode( ForgeDirection side )
|
||||||
{
|
{
|
||||||
return side == this.side ? this.node : null;
|
return side == this.side ? this.node : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canConnect(ForgeDirection side)
|
public boolean canConnect( ForgeDirection side )
|
||||||
{
|
{
|
||||||
return side == this.side;
|
return side == this.side;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -185,12 +185,9 @@ public class Ingredient implements IIngredient
|
|||||||
/*
|
/*
|
||||||
* Object o = Item.itemRegistry.getObject( nameSpace + ":" + itemName ); if ( o instanceof Item ) return new
|
* Object o = Item.itemRegistry.getObject( nameSpace + ":" + itemName ); if ( o instanceof Item ) return new
|
||||||
* ItemStack( (Item) o, qty, meta );
|
* ItemStack( (Item) o, qty, meta );
|
||||||
*
|
|
||||||
* if ( o instanceof Block ) return new ItemStack( (Block) o, qty, meta );
|
* if ( o instanceof Block ) return new ItemStack( (Block) o, qty, meta );
|
||||||
*
|
|
||||||
* o = Item.itemRegistry.getObject( nameSpace + ":item." + itemName ); if ( o instanceof Item ) return new
|
* o = Item.itemRegistry.getObject( nameSpace + ":item." + itemName ); if ( o instanceof Item ) return new
|
||||||
* ItemStack( (Item) o, qty, meta );
|
* ItemStack( (Item) o, qty, meta );
|
||||||
*
|
|
||||||
* o = Block.blockRegistry.getObject( nameSpace + ":tile." + itemName ); if ( o instanceof Block && (!(o
|
* o = Block.blockRegistry.getObject( nameSpace + ":tile." + itemName ); if ( o instanceof Block && (!(o
|
||||||
* instanceof BlockAir)) ) return new ItemStack( (Block) o, qty, meta );
|
* instanceof BlockAir)) ) return new ItemStack( (Block) o, qty, meta );
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -106,7 +106,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable
|
|||||||
|
|
||||||
Map<Character, IIngredient> itemMap = new HashMap<Character, IIngredient>();
|
Map<Character, IIngredient> itemMap = new HashMap<Character, IIngredient>();
|
||||||
|
|
||||||
for(; idx < recipe.length; idx += 2 )
|
for( ; idx < recipe.length; idx += 2 )
|
||||||
{
|
{
|
||||||
Character chr = (Character) recipe[idx];
|
Character chr = (Character) recipe[idx];
|
||||||
Object in = recipe[idx + 1];
|
Object in = recipe[idx + 1];
|
||||||
@@ -271,7 +271,7 @@ public class ShapedRecipe implements IRecipe, IRecipeBakeable
|
|||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return ( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
|
return( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
public ShapedRecipe setMirrored( boolean mirror )
|
public ShapedRecipe setMirrored( boolean mirror )
|
||||||
|
|||||||
@@ -146,7 +146,7 @@ public class ShapelessRecipe implements IRecipe, IRecipeBakeable
|
|||||||
|
|
||||||
private boolean checkItemEquals( ItemStack target, ItemStack input )
|
private boolean checkItemEquals( ItemStack target, ItemStack input )
|
||||||
{
|
{
|
||||||
return ( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
|
return( target.getItem() == input.getItem() && ( target.getItemDamage() == OreDictionary.WILDCARD_VALUE || target.getItemDamage() == input.getItemDamage() ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ public final class Inscribe extends InscriberProcess
|
|||||||
@Override
|
@Override
|
||||||
public void register() throws RegistrationError, MissingIngredientError
|
public void register() throws RegistrationError, MissingIngredientError
|
||||||
{
|
{
|
||||||
if ( this.getImprintable() == null )
|
if( this.getImprintable() == null )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( this.getOutput() == null )
|
if( this.getOutput() == null )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -58,8 +58,8 @@ public final class Inscribe extends InscriberProcess
|
|||||||
final ItemStack[] realInput = this.getImprintable().getItemStackSet();
|
final ItemStack[] realInput = this.getImprintable().getItemStackSet();
|
||||||
final List<ItemStack> inputs = new ArrayList<ItemStack>( realInput.length );
|
final List<ItemStack> inputs = new ArrayList<ItemStack>( realInput.length );
|
||||||
Collections.addAll( inputs, realInput );
|
Collections.addAll( inputs, realInput );
|
||||||
final ItemStack top = (this.getTopOptional() == null) ? null : this.getTopOptional().getItemStack();
|
final ItemStack top = ( this.getTopOptional() == null ) ? null : this.getTopOptional().getItemStack();
|
||||||
final ItemStack bot = (this.getBotOptional() == null) ? null : this.getBotOptional().getItemStack();
|
final ItemStack bot = ( this.getBotOptional() == null ) ? null : this.getBotOptional().getItemStack();
|
||||||
final ItemStack output = this.getOutput().getItemStack();
|
final ItemStack output = this.getOutput().getItemStack();
|
||||||
final InscriberProcessType type = InscriberProcessType.Inscribe;
|
final InscriberProcessType type = InscriberProcessType.Inscribe;
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.recipes.handlers;
|
package appeng.recipes.handlers;
|
||||||
|
|
||||||
|
|
||||||
@@ -78,7 +79,7 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali
|
|||||||
{
|
{
|
||||||
String pattern = "inscriber ";
|
String pattern = "inscriber ";
|
||||||
|
|
||||||
if ( this.output != null )
|
if( this.output != null )
|
||||||
{
|
{
|
||||||
pattern += this.output.getQty() + '\n';
|
pattern += this.output.getQty() + '\n';
|
||||||
pattern += handler.getName( this.output ) + '\n';
|
pattern += handler.getName( this.output ) + '\n';
|
||||||
@@ -89,7 +90,7 @@ public abstract class InscriberProcess implements ICraftHandler, IWebsiteSeriali
|
|||||||
pattern += handler.getName( this.topOptional ) + '\n';
|
pattern += handler.getName( this.topOptional ) + '\n';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( this.imprintable != null )
|
if( this.imprintable != null )
|
||||||
{
|
{
|
||||||
pattern += handler.getName( this.imprintable );
|
pattern += handler.getName( this.imprintable );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -46,11 +46,11 @@ public final class Press extends InscriberProcess
|
|||||||
@Override
|
@Override
|
||||||
public void register() throws RegistrationError, MissingIngredientError
|
public void register() throws RegistrationError, MissingIngredientError
|
||||||
{
|
{
|
||||||
if ( this.getImprintable() == null )
|
if( this.getImprintable() == null )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if ( this.getOutput() == null )
|
if( this.getOutput() == null )
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -78,9 +78,9 @@ public class RecipeResourceCopier
|
|||||||
*
|
*
|
||||||
* @param destination destination folder to which the recipes are copied to
|
* @param destination destination folder to which the recipes are copied to
|
||||||
*
|
*
|
||||||
* @throws URISyntaxException {@see #getResourceListing}
|
* @throws URISyntaxException {@see #getResourceListing}
|
||||||
* @throws IOException {@see #getResourceListing} and if copying the detected resource to file is not possible
|
* @throws IOException {@see #getResourceListing} and if copying the detected resource to file is not possible
|
||||||
* @throws NullPointerException if either parameter is <tt>null</tt>
|
* @throws NullPointerException if either parameter is <tt>null</tt>
|
||||||
* @throws IllegalArgumentException if destination is not a directory
|
* @throws IllegalArgumentException if destination is not a directory
|
||||||
*/
|
*/
|
||||||
public void copyTo( @Nonnull File destination ) throws URISyntaxException, IOException
|
public void copyTo( @Nonnull File destination ) throws URISyntaxException, IOException
|
||||||
@@ -113,12 +113,12 @@ public class RecipeResourceCopier
|
|||||||
* Works for regular files and also JARs.
|
* Works for regular files and also JARs.
|
||||||
*
|
*
|
||||||
* @param clazz Any java class that lives in the same place as the resources you want.
|
* @param clazz Any java class that lives in the same place as the resources you want.
|
||||||
* @param path Should end with "/", but not start with one.
|
* @param path Should end with "/", but not start with one.
|
||||||
*
|
*
|
||||||
* @return Just the name of each member item, not the full paths.
|
* @return Just the name of each member item, not the full paths.
|
||||||
*
|
*
|
||||||
* @throws URISyntaxException if it is a file path and the URL can not be converted to URI
|
* @throws URISyntaxException if it is a file path and the URL can not be converted to URI
|
||||||
* @throws IOException if jar path can not be decoded
|
* @throws IOException if jar path can not be decoded
|
||||||
* @throws UnsupportedOperationException if it is neither in jar nor in file path
|
* @throws UnsupportedOperationException if it is neither in jar nor in file path
|
||||||
*/
|
*/
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@@ -136,28 +136,31 @@ public class RecipeResourceCopier
|
|||||||
|
|
||||||
if( dirURL == null )
|
if( dirURL == null )
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* In case of a jar file, we can't actually find a directory.
|
* In case of a jar file, we can't actually find a directory.
|
||||||
* Have to assume the same jar as clazz.
|
* Have to assume the same jar as clazz.
|
||||||
*/
|
*/
|
||||||
final String me = DOT_COMPILE_PATTERN.matcher( clazz.getName() ).replaceAll( "/" ) + ".class";
|
final String me = DOT_COMPILE_PATTERN.matcher( clazz.getName() ).replaceAll( "/" ) + ".class";
|
||||||
dirURL = clazz.getClassLoader().getResource( me );
|
dirURL = clazz.getClassLoader().getResource( me );
|
||||||
}
|
}
|
||||||
|
|
||||||
if( dirURL != null && dirURL.getProtocol().equals( "jar" ) )
|
if( dirURL != null && dirURL.getProtocol().equals( "jar" ) )
|
||||||
{
|
{
|
||||||
/* A JAR path */
|
/* A JAR path */
|
||||||
final String jarPath = dirURL.getPath().substring( 5, dirURL.getPath().indexOf( '!' ) ); //strip out only the JAR file
|
final String jarPath = dirURL.getPath().substring( 5, dirURL.getPath().indexOf( '!' ) ); // strip out only
|
||||||
|
// the JAR file
|
||||||
final JarFile jar = new JarFile( URLDecoder.decode( jarPath, "UTF-8" ) );
|
final JarFile jar = new JarFile( URLDecoder.decode( jarPath, "UTF-8" ) );
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
final Enumeration<JarEntry> entries = jar.entries(); //gives ALL entries in jar
|
final Enumeration<JarEntry> entries = jar.entries(); // gives ALL entries in jar
|
||||||
final Collection<String> result = new HashSet<String>( INITIAL_RESOURCE_CAPACITY ); //avoid duplicates in case it is a subdirectory
|
final Collection<String> result = new HashSet<String>( INITIAL_RESOURCE_CAPACITY ); // avoid duplicates
|
||||||
|
// in case it is a
|
||||||
|
// subdirectory
|
||||||
while( entries.hasMoreElements() )
|
while( entries.hasMoreElements() )
|
||||||
{
|
{
|
||||||
final String name = entries.nextElement().getName();
|
final String name = entries.nextElement().getName();
|
||||||
if( name.startsWith( path ) )
|
if( name.startsWith( path ) )
|
||||||
{ //filter according to the path
|
{ // filter according to the path
|
||||||
String entry = name.substring( path.length() );
|
String entry = name.substring( path.length() );
|
||||||
final int checkSubDir = entry.indexOf( '/' );
|
final int checkSubDir = entry.indexOf( '/' );
|
||||||
if( checkSubDir >= 0 )
|
if( checkSubDir >= 0 )
|
||||||
|
|||||||
@@ -220,7 +220,6 @@ public final class CompassService
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private class CMDirectionRequest implements Runnable
|
private class CMDirectionRequest implements Runnable
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ public final class VersionChecker implements Runnable
|
|||||||
/**
|
/**
|
||||||
* checks if enough time since last check has expired
|
* checks if enough time since last check has expired
|
||||||
*
|
*
|
||||||
* @param nowInMs now in milli seconds
|
* @param nowInMs now in milli seconds
|
||||||
* @param lastAfterInterval last version check including the interval defined in the config
|
* @param lastAfterInterval last version check including the interval defined in the config
|
||||||
*/
|
*/
|
||||||
private void processInterval( long nowInMs, long lastAfterInterval )
|
private void processInterval( long nowInMs, long lastAfterInterval )
|
||||||
@@ -118,7 +118,7 @@ public final class VersionChecker implements Runnable
|
|||||||
* Checks if the retrieved version is newer as the current mod version.
|
* Checks if the retrieved version is newer as the current mod version.
|
||||||
* Will notify player if config is enabled.
|
* Will notify player if config is enabled.
|
||||||
*
|
*
|
||||||
* @param modVersion version of mod
|
* @param modVersion version of mod
|
||||||
* @param githubRelease release retrieved through github
|
* @param githubRelease release retrieved through github
|
||||||
*/
|
*/
|
||||||
private void processVersions( Version modVersion, FormattedRelease githubRelease )
|
private void processVersions( Version modVersion, FormattedRelease githubRelease )
|
||||||
@@ -153,8 +153,8 @@ public final class VersionChecker implements Runnable
|
|||||||
* Checks if the version checker mod is installed and handles it depending on that information
|
* Checks if the version checker mod is installed and handles it depending on that information
|
||||||
*
|
*
|
||||||
* @param modFormatted mod version formatted as rv2-beta-8
|
* @param modFormatted mod version formatted as rv2-beta-8
|
||||||
* @param ghFormatted retrieved github version formatted as rv2-beta-8
|
* @param ghFormatted retrieved github version formatted as rv2-beta-8
|
||||||
* @param changelog retrieved github changelog
|
* @param changelog retrieved github changelog
|
||||||
*/
|
*/
|
||||||
private void interactWithVersionCheckerMod( String modFormatted, String ghFormatted, String changelog )
|
private void interactWithVersionCheckerMod( String modFormatted, String ghFormatted, String changelog )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ public final class CompassRegion
|
|||||||
|
|
||||||
private File getFile()
|
private File getFile()
|
||||||
{
|
{
|
||||||
final String fileName = this.encoder.encode( this.world, this.lowX, this.lowZ);
|
final String fileName = this.encoder.encode( this.world, this.lowX, this.lowZ );
|
||||||
|
|
||||||
return new File( this.worldCompassFolder, fileName );
|
return new File( this.worldCompassFolder, fileName );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,9 +26,9 @@ public interface ICompassCallback
|
|||||||
* Called from another thread.
|
* Called from another thread.
|
||||||
*
|
*
|
||||||
* @param hasResult true if found a target
|
* @param hasResult true if found a target
|
||||||
* @param spin true if should spin
|
* @param spin true if should spin
|
||||||
* @param radians radians
|
* @param radians radians
|
||||||
* @param dist distance
|
* @param dist distance
|
||||||
*/
|
*/
|
||||||
void calculatedDirection( boolean hasResult, boolean spin, double radians, double dist );
|
void calculatedDirection( boolean hasResult, boolean spin, double radians, double dist );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version;
|
package appeng.services.version;
|
||||||
|
|
||||||
|
|
||||||
@@ -14,8 +15,8 @@ public abstract class BaseVersion implements Version
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param revision revision in natural number
|
* @param revision revision in natural number
|
||||||
* @param channel channel
|
* @param channel channel
|
||||||
* @param build build in natural number
|
* @param build build in natural number
|
||||||
*
|
*
|
||||||
* @throws AssertionError if assertion are enabled and revision or build are not natural numbers
|
* @throws AssertionError if assertion are enabled and revision or build are not natural numbers
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version;
|
package appeng.services.version;
|
||||||
|
|
||||||
|
|
||||||
@@ -9,8 +10,8 @@ public final class DefaultVersion extends BaseVersion
|
|||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @param revision natural number
|
* @param revision natural number
|
||||||
* @param channel either alpha, beta or release
|
* @param channel either alpha, beta or release
|
||||||
* @param build natural number
|
* @param build natural number
|
||||||
*/
|
*/
|
||||||
public DefaultVersion( int revision, Channel channel, int build )
|
public DefaultVersion( int revision, Channel channel, int build )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version;
|
package appeng.services.version;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version;
|
package appeng.services.version;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version;
|
package appeng.services.version;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version.github;
|
package appeng.services.version.github;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version.github;
|
package appeng.services.version.github;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version.github;
|
package appeng.services.version.github;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version.github;
|
package appeng.services.version.github;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
package appeng.services.version.github;
|
package appeng.services.version.github;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ public class StorageHelper
|
|||||||
* Mostly from dimensional doors.. which mostly got it form X-Comp.
|
* Mostly from dimensional doors.. which mostly got it form X-Comp.
|
||||||
*
|
*
|
||||||
* @param entity to be teleported entity
|
* @param entity to be teleported entity
|
||||||
* @param link destination
|
* @param link destination
|
||||||
*
|
*
|
||||||
* @return teleported entity
|
* @return teleported entity
|
||||||
*/
|
*/
|
||||||
@@ -207,7 +207,9 @@ public class StorageHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void swapRegions( World src /** over world **/, World dst /** storage cell **/, int x, int y, int z, int i, int j, int k, int scaleX, int scaleY, int scaleZ )
|
public void swapRegions( World src /** over world **/
|
||||||
|
, World dst /** storage cell **/
|
||||||
|
, int x, int y, int z, int i, int j, int k, int scaleX, int scaleY, int scaleZ )
|
||||||
{
|
{
|
||||||
for( Block matrixFrameBlock : AEApi.instance().definitions().blocks().matrixFrame().maybeBlock().asSet() )
|
for( Block matrixFrameBlock : AEApi.instance().definitions().blocks().matrixFrame().maybeBlock().asSet() )
|
||||||
{
|
{
|
||||||
@@ -254,9 +256,9 @@ public class StorageHelper
|
|||||||
this.transverseEdges( i, j, k, i + scaleX, j + scaleY, k + scaleZ, new TriggerUpdates( dst ) );
|
this.transverseEdges( i, j, k, i + scaleX, j + scaleY, k + scaleZ, new TriggerUpdates( dst ) );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* IChunkProvider cp = destination.getChunkProvider(); if ( cp instanceof ChunkProviderServer ) { ChunkProviderServer
|
* IChunkProvider cp = destination.getChunkProvider(); if ( cp instanceof ChunkProviderServer ) {
|
||||||
|
* ChunkProviderServer
|
||||||
* srv = (ChunkProviderServer) cp; srv.unloadAllChunks(); }
|
* srv = (ChunkProviderServer) cp; srv.unloadAllChunks(); }
|
||||||
*
|
|
||||||
* cp.unloadQueuedChunks();
|
* cp.unloadQueuedChunks();
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -280,7 +282,6 @@ public class StorageHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static class WrapInMatrixFrame implements ISpatialVisitor
|
static class WrapInMatrixFrame implements ISpatialVisitor
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -302,7 +303,6 @@ public class StorageHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static class TelDestination
|
static class TelDestination
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -326,7 +326,6 @@ public class StorageHelper
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static class METeleporter extends Teleporter
|
static class METeleporter extends Teleporter
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|||||||
@@ -349,7 +349,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
|||||||
final Class<? extends AEBaseTile> clazz = this.getClass();
|
final Class<? extends AEBaseTile> clazz = this.getClass();
|
||||||
final Map<TileEventType, List<AETileEventHandler>> storedHandlers = HANDLERS.get( clazz );
|
final Map<TileEventType, List<AETileEventHandler>> storedHandlers = HANDLERS.get( clazz );
|
||||||
|
|
||||||
if ( storedHandlers == null )
|
if( storedHandlers == null )
|
||||||
{
|
{
|
||||||
final Map<TileEventType, List<AETileEventHandler>> newStoredHandlers = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class );
|
final Map<TileEventType, List<AETileEventHandler>> newStoredHandlers = new EnumMap<TileEventType, List<AETileEventHandler>>( TileEventType.class );
|
||||||
|
|
||||||
@@ -373,7 +373,8 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
private List<AETileEventHandler> getHandlers( Map<TileEventType, List<AETileEventHandler>> eventToHandlers, TileEventType event ) {
|
private List<AETileEventHandler> getHandlers( Map<TileEventType, List<AETileEventHandler>> eventToHandlers, TileEventType event )
|
||||||
|
{
|
||||||
final List<AETileEventHandler> oldHandlers = eventToHandlers.get( event );
|
final List<AETileEventHandler> oldHandlers = eventToHandlers.get( event );
|
||||||
|
|
||||||
if( oldHandlers == null )
|
if( oldHandlers == null )
|
||||||
@@ -434,7 +435,7 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
|||||||
/**
|
/**
|
||||||
* depending on the from, different settings will be accepted, don't call this with null
|
* depending on the from, different settings will be accepted, don't call this with null
|
||||||
*
|
*
|
||||||
* @param from source of settings
|
* @param from source of settings
|
||||||
* @param compound compound of source
|
* @param compound compound of source
|
||||||
*/
|
*/
|
||||||
public void uploadSettings( SettingsFrom from, NBTTagCompound compound )
|
public void uploadSettings( SettingsFrom from, NBTTagCompound compound )
|
||||||
@@ -473,10 +474,10 @@ public class AEBaseTile extends TileEntity implements IOrientable, ICommonTile,
|
|||||||
/**
|
/**
|
||||||
* returns the contents of the tile entity, into the world, defaults to dropping everything in the inventory.
|
* returns the contents of the tile entity, into the world, defaults to dropping everything in the inventory.
|
||||||
*
|
*
|
||||||
* @param w world
|
* @param w world
|
||||||
* @param x x pos of tile entity
|
* @param x x pos of tile entity
|
||||||
* @param y y pos of tile entity
|
* @param y y pos of tile entity
|
||||||
* @param z z pos of tile entity
|
* @param z z pos of tile entity
|
||||||
* @param drops drops of tile entity
|
* @param drops drops of tile entity
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ public class TileCellWorkbench extends AEBaseTile implements IUpgradeableHost, I
|
|||||||
|
|
||||||
if( this.cell.getStackInSlot( 0 ).getItem() instanceof ICellWorkbenchItem )
|
if( this.cell.getStackInSlot( 0 ).getItem() instanceof ICellWorkbenchItem )
|
||||||
{
|
{
|
||||||
return ( (ICellWorkbenchItem) this.cell.getStackInSlot( 0 ).getItem() );
|
return( (ICellWorkbenchItem) this.cell.getStackInSlot( 0 ).getItem() );
|
||||||
}
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -398,10 +398,10 @@ public class TileInscriber extends AENetworkPowerTile implements IGridTickable,
|
|||||||
{
|
{
|
||||||
|
|
||||||
boolean matchA = ( plateA == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( plateA, recipe.getTopOptional().orNull() ) ) && // and...
|
boolean matchA = ( plateA == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( plateA, recipe.getTopOptional().orNull() ) ) && // and...
|
||||||
( plateB == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateB, recipe.getBottomOptional().orNull() ) );
|
( plateB == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateB, recipe.getBottomOptional().orNull() ) );
|
||||||
|
|
||||||
boolean matchB = ( plateB == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( plateB, recipe.getTopOptional().orNull() ) ) && // and...
|
boolean matchB = ( plateB == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( plateB, recipe.getTopOptional().orNull() ) ) && // and...
|
||||||
( plateA == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateA, recipe.getBottomOptional().orNull() ) );
|
( plateA == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( plateA, recipe.getBottomOptional().orNull() ) );
|
||||||
|
|
||||||
if( matchA || matchB )
|
if( matchA || matchB )
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -289,7 +289,7 @@ public class TileVibrationChamber extends AENetworkInvTile implements IGridTicka
|
|||||||
this.isOn = this.burnTime > 0;
|
this.isOn = this.burnTime > 0;
|
||||||
this.markForUpdate();
|
this.markForUpdate();
|
||||||
|
|
||||||
if ( this.hasWorldObj() )
|
if( this.hasWorldObj() )
|
||||||
{
|
{
|
||||||
Platform.notifyBlocksOfNeighbors( this.worldObj, this.xCoord, this.yCoord, this.zCoord );
|
Platform.notifyBlocksOfNeighbors( this.worldObj, this.xCoord, this.yCoord, this.zCoord );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -279,7 +279,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
|||||||
public boolean isBlocked( ForgeDirection side )
|
public boolean isBlocked( ForgeDirection side )
|
||||||
{
|
{
|
||||||
return !this.ImmibisMicroblocks_isSideOpen( side.ordinal() );
|
return !this.ImmibisMicroblocks_isSideOpen( side.ordinal() );
|
||||||
} @Override
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean visual )
|
public Iterable<AxisAlignedBB> getSelectedBoundingBoxesFromPool( World w, int x, int y, int z, Entity e, boolean visual )
|
||||||
{
|
{
|
||||||
return this.cb.getSelectedBoundingBoxesFromPool( false, true, e, visual );
|
return this.cb.getSelectedBoundingBoxesFromPool( false, true, e, visual );
|
||||||
@@ -334,7 +336,9 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.getWorldObj().setBlock( this.xCoord, this.yCoord, this.zCoord, Platform.AIR_BLOCK );
|
this.getWorldObj().setBlock( this.xCoord, this.yCoord, this.zCoord, Platform.AIR_BLOCK );
|
||||||
} @Override
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
public void addCollidingBlockToList( World w, int x, int y, int z, AxisAlignedBB bb, List<AxisAlignedBB> out, Entity e )
|
||||||
{
|
{
|
||||||
for( AxisAlignedBB bx : this.getSelectedBoundingBoxesFromPool( w, x, y, z, e, false ) )
|
for( AxisAlignedBB bx : this.getSelectedBoundingBoxesFromPool( w, x, y, z, e, false ) )
|
||||||
@@ -374,7 +378,4 @@ public class TileCableBus extends AEBaseTile implements AEMultiTile, ICustomColl
|
|||||||
return this.cb.recolourBlock( side, colour, who );
|
return this.cb.recolourBlock( side, colour, who );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,7 +34,8 @@ import appeng.transformer.annotations.Integration.Interface;
|
|||||||
import appeng.transformer.annotations.Integration.InterfaceList;
|
import appeng.transformer.annotations.Integration.InterfaceList;
|
||||||
import appeng.transformer.annotations.Integration.Method;
|
import appeng.transformer.annotations.Integration.Method;
|
||||||
|
|
||||||
@InterfaceList( value = { @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver" ), @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Interfaces.Transducerable") } )
|
|
||||||
|
@InterfaceList( value = { @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver" ), @Interface( iname = "RotaryCraft", iface = "Reika.RotaryCraft.API.Interfaces.Transducerable" ) } )
|
||||||
public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerReceiver, Transducerable
|
public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerReceiver, Transducerable
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -176,7 +177,6 @@ public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerRecei
|
|||||||
out = String.format( "Receiving %d W @ %d rad/s.", power, omega );
|
out = String.format( "Receiving %d W @ %d rad/s.", power, omega );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ArrayList<String> messages = new ArrayList<String>( 1 );
|
ArrayList<String> messages = new ArrayList<String>( 1 );
|
||||||
messages.add( out );
|
messages.add( out );
|
||||||
return messages;
|
return messages;
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user