Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7f72ba97f0 | |||
| c3db5ef9e4 | |||
| f955febb5d | |||
| 3115147edf | |||
| 1cec5922a0 | |||
| 322b296639 | |||
| d1244f59ed | |||
| 6a18102ea0 | |||
| 300a9618b6 | |||
| dfb435ae7d | |||
| 1728f683c3 | |||
| c0b62fd519 | |||
| 67c901966e | |||
| a5287f6779 | |||
| 8234c6dbb5 | |||
| 9c8deac9de | |||
| c21a44d8c0 | |||
| 3c62734c87 | |||
| 5b6b14cde7 | |||
| 51c92d3dfb | |||
| 37295745cf | |||
| c3ce9d9542 | |||
| 6d42032738 |
@@ -35,6 +35,7 @@ code_chicken_core_version=1.0.7.46
|
||||
nei_version=1.0.5.111
|
||||
bc_version=7.0.9
|
||||
opencomputers_version=1.5.12.26
|
||||
pneumaticcraft_version=1.9.15-105
|
||||
|
||||
#########################################################
|
||||
# Self Compiled APIs #
|
||||
|
||||
@@ -56,6 +56,11 @@ repositories {
|
||||
url = "http://maven.cil.li/"
|
||||
}
|
||||
|
||||
maven {
|
||||
name = "MM repo"
|
||||
url = "http://maven.k-4u.nl/"
|
||||
}
|
||||
|
||||
ivy {
|
||||
name "BuildCraft"
|
||||
artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision]-[classifier].[ext]"
|
||||
@@ -109,6 +114,7 @@ dependencies {
|
||||
compile "codechicken:CodeChickenCore:${minecraft_version}-${code_chicken_core_version}:dev"
|
||||
compile "codechicken:NotEnoughItems:${minecraft_version}-${nei_version}:dev"
|
||||
compile "com.mod-buildcraft:buildcraft:${bc_version}:dev"
|
||||
compile "pneumaticCraft:PneumaticCraft-${minecraft_version}:${pneumaticcraft_version}:api"
|
||||
|
||||
// provided APIs
|
||||
compile "li.cil.oc:OpenComputers:MC${minecraft_version}-${opencomputers_version}:api"
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package appeng.api.config;
|
||||
|
||||
|
||||
public enum SchedulingMode
|
||||
{
|
||||
DEFAULT, ROUNDROBIN, RANDOM
|
||||
}
|
||||
@@ -54,13 +54,15 @@ public enum Settings
|
||||
|
||||
INTERFACE_TERMINAL( EnumSet.of( YesNo.YES, YesNo.NO ) ), CRAFT_VIA_REDSTONE( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
|
||||
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) );
|
||||
STORAGE_FILTER( EnumSet.allOf( StorageFilter.class ) ), PLACE_BLOCK( EnumSet.of( YesNo.YES, YesNo.NO ) ),
|
||||
|
||||
SCHEDULING_MODE( EnumSet.allOf( SchedulingMode.class ) );
|
||||
|
||||
private final EnumSet<? extends Enum<?>> values;
|
||||
|
||||
Settings( @Nonnull EnumSet<? extends Enum<?>> possibleOptions )
|
||||
{
|
||||
if ( possibleOptions.isEmpty() )
|
||||
if( possibleOptions.isEmpty() )
|
||||
{
|
||||
throw new IllegalArgumentException( "Tried to instantiate an empty setting." );
|
||||
}
|
||||
|
||||
@@ -34,5 +34,6 @@ public enum TunnelType
|
||||
ITEM, // Item Tunnel
|
||||
LIGHT, // Light Tunnel
|
||||
BUNDLED_REDSTONE, // Bundled Redstone Tunnel
|
||||
COMPUTER_MESSAGE // Computer Message Tunnel
|
||||
COMPUTER_MESSAGE, // Computer Message Tunnel
|
||||
PRESSURE // PneumaticCraft Tunnel
|
||||
}
|
||||
|
||||
@@ -86,6 +86,8 @@ public interface IParts
|
||||
|
||||
IItemDefinition p2PTunnelOpenComputers();
|
||||
|
||||
IItemDefinition p2PTunnelPneumaticCraft();
|
||||
|
||||
IItemDefinition cableAnchor();
|
||||
|
||||
IItemDefinition monitor();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
* Copyright (c) 2013 - 2015 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
@@ -24,11 +24,19 @@
|
||||
package appeng.api.features;
|
||||
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
import appeng.api.recipes.IRecipeHandler;
|
||||
import appeng.api.recipes.ISubItemResolver;
|
||||
|
||||
|
||||
/**
|
||||
* @author AlgorithmX2
|
||||
* @author thatsIch
|
||||
* @version rv3 - 10.08.2015
|
||||
* @since rv0
|
||||
*/
|
||||
public interface IRecipeHandlerRegistry
|
||||
{
|
||||
|
||||
@@ -37,7 +45,7 @@ public interface IRecipeHandlerRegistry
|
||||
*
|
||||
* MUST BE CALLED IN PRE-INIT
|
||||
*
|
||||
* @param name name of crafthandler
|
||||
* @param name name of crafthandler
|
||||
* @param handler class of crafthandler
|
||||
*/
|
||||
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
|
||||
@@ -56,6 +64,7 @@ public interface IRecipeHandlerRegistry
|
||||
*
|
||||
* @return A recipe handler by name, returns null on failure.
|
||||
*/
|
||||
@Nullable
|
||||
ICraftHandler getCraftHandlerFor( String name );
|
||||
|
||||
/**
|
||||
@@ -67,9 +76,10 @@ public interface IRecipeHandlerRegistry
|
||||
* resolve sub items by name.
|
||||
*
|
||||
* @param nameSpace namespace of item
|
||||
* @param itemName full name of item
|
||||
* @param itemName full name of item
|
||||
*
|
||||
* @return ResolverResult or ResolverResultSet
|
||||
* @return ResolverResult or ResolverResultSet or null if could not resolve
|
||||
*/
|
||||
@Nullable
|
||||
Object resolveItem( String nameSpace, String itemName );
|
||||
}
|
||||
|
||||
@@ -56,7 +56,6 @@ import appeng.client.texture.FlippableIcon;
|
||||
import appeng.client.texture.MissingIcon;
|
||||
import appeng.core.features.AEBlockFeatureHandler;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.ActivityState;
|
||||
import appeng.core.features.FeatureNameExtractor;
|
||||
import appeng.core.features.IAEFeature;
|
||||
import appeng.core.features.IFeatureHandler;
|
||||
|
||||
@@ -1,11 +1,15 @@
|
||||
|
||||
package appeng.block;
|
||||
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
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 );
|
||||
}
|
||||
|
||||
@@ -22,15 +22,14 @@ package appeng.block;
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.IIcon;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.IAEFeature;
|
||||
import appeng.core.features.IFeatureHandler;
|
||||
@@ -57,24 +56,27 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
||||
this.setResistance( block.getExplosionResistance( null ) * 5.0F / 3.0F );
|
||||
this.setStepSound( block.stepSound );
|
||||
this.useNeighborBrightness = true;
|
||||
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;
|
||||
if( !this.field_150004_a )
|
||||
{
|
||||
this.doubleSlabs = new AEBaseSlabBlock( block, meta, features, true, name + ".double" ).setSlabs( this );
|
||||
}
|
||||
this.features = !this.field_150004_a ? new SlabBlockFeatureHandler( features, this ) : null;
|
||||
}
|
||||
|
||||
public AEBaseSlabBlock setSlabs(AEBaseSlabBlock slabs)
|
||||
public AEBaseSlabBlock setSlabs( AEBaseSlabBlock slabs )
|
||||
{
|
||||
this.slabs = slabs;
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
public AEBaseSlabBlock slabs()
|
||||
{
|
||||
return slabs;
|
||||
return this.slabs;
|
||||
}
|
||||
|
||||
|
||||
public AEBaseSlabBlock doubleSlabs()
|
||||
{
|
||||
return doubleSlabs;
|
||||
return this.doubleSlabs;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -90,40 +92,48 @@ public class AEBaseSlabBlock extends BlockSlab implements IAEFeature
|
||||
}
|
||||
|
||||
@Override
|
||||
public IIcon getIcon(int dir, int meta)
|
||||
public IIcon getIcon( int dir, int meta )
|
||||
{
|
||||
return block.getIcon( dir, this.meta );
|
||||
return this.block.getIcon( dir, this.meta );
|
||||
}
|
||||
|
||||
@Override
|
||||
public String func_150002_b(int p_150002_1_)
|
||||
public String func_150002_b( int p_150002_1_ )
|
||||
{
|
||||
return this.getUnlocalizedName();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerBlockIcons(IIconRegister reg) { }
|
||||
|
||||
@Override
|
||||
public Item getItemDropped(int meta, Random rand, int fortune)
|
||||
public void registerBlockIcons( IIconRegister reg )
|
||||
{
|
||||
return this.field_150004_a ? Item.getItemFromBlock(this.slabs) : Item.getItemFromBlock(this);
|
||||
}
|
||||
|
||||
@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;
|
||||
if (block.field_150004_a) block = this.slabs;
|
||||
@Override
|
||||
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;
|
||||
return new ItemStack(block, 1, meta);
|
||||
if( block == null )
|
||||
{
|
||||
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()
|
||||
{
|
||||
return name;
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,9 +53,7 @@ import appeng.api.util.IOrientable;
|
||||
import appeng.block.networking.BlockCableBus;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.core.features.AETileBlockFeatureHandler;
|
||||
import appeng.core.features.ActivityState;
|
||||
import appeng.core.features.IAEFeature;
|
||||
import appeng.core.features.ItemStackSrc;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
import appeng.tile.AEBaseTile;
|
||||
import appeng.tile.networking.TileCableBus;
|
||||
|
||||
@@ -455,7 +455,8 @@ public class BlockCableBus extends AEBaseTileBlock implements IRedNetConnection
|
||||
return this.cb( world, x, y, z ).recolourBlock( side, AEColor.values()[colour], who );
|
||||
}
|
||||
catch( Throwable ignored )
|
||||
{}
|
||||
{
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import net.minecraft.block.material.Material;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.render.blocks.RenderQNB;
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.helpers.ICustomCollision;
|
||||
|
||||
@@ -20,7 +20,6 @@ package appeng.block.qnb;
|
||||
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
@@ -28,7 +27,6 @@ import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.core.features.AEFeature;
|
||||
import appeng.tile.qnb.TileQuantumBridge;
|
||||
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.block.solids;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.Random;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.material.Material;
|
||||
|
||||
@@ -62,7 +62,7 @@ public class OreQuartzCharged extends OreQuartz
|
||||
@Override
|
||||
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();
|
||||
}
|
||||
@@ -74,7 +74,7 @@ public class OreQuartzCharged extends OreQuartz
|
||||
@SideOnly( Side.CLIENT )
|
||||
public void randomDisplayTick( World w, int x, int y, int z, Random r )
|
||||
{
|
||||
if ( !AEConfig.instance.enableEffects )
|
||||
if( !AEConfig.instance.enableEffects )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -63,7 +63,6 @@ import appeng.helpers.WirelessTerminalGuiObject;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.parts.reporting.AbstractPartTerminal;
|
||||
import appeng.parts.reporting.PartTerminal;
|
||||
import appeng.tile.misc.TileSecurity;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -26,6 +26,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SchedulingMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
import appeng.api.config.YesNo;
|
||||
@@ -36,6 +37,7 @@ import appeng.container.implementations.ContainerUpgradeable;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.core.sync.network.NetworkHandler;
|
||||
import appeng.core.sync.packets.PacketConfigButton;
|
||||
import appeng.parts.automation.PartExportBus;
|
||||
import appeng.parts.automation.PartImportBus;
|
||||
|
||||
|
||||
@@ -48,6 +50,7 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
GuiImgButton redstoneMode;
|
||||
GuiImgButton fuzzyMode;
|
||||
GuiImgButton craftMode;
|
||||
GuiImgButton schedulingMode;
|
||||
|
||||
public GuiUpgradeable( InventoryPlayer inventoryPlayer, IUpgradeableHost te )
|
||||
{
|
||||
@@ -81,10 +84,12 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
this.redstoneMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 8, Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
|
||||
this.fuzzyMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 28, Settings.FUZZY_MODE, FuzzyMode.IGNORE_ALL );
|
||||
this.craftMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 48, Settings.CRAFT_ONLY, YesNo.NO );
|
||||
this.schedulingMode = new GuiImgButton( this.guiLeft - 18, this.guiTop + 68, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT );
|
||||
|
||||
this.buttonList.add( this.craftMode );
|
||||
this.buttonList.add( this.redstoneMode );
|
||||
this.buttonList.add( this.fuzzyMode );
|
||||
this.buttonList.add( this.schedulingMode );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -107,6 +112,11 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
this.craftMode.set( this.cvb.cMode );
|
||||
}
|
||||
|
||||
if( this.schedulingMode != null )
|
||||
{
|
||||
this.schedulingMode.set( this.cvb.schedulingMode );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -140,6 +150,10 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
this.craftMode.setVisibility( this.bc.getInstalledUpgrades( Upgrades.CRAFTING ) > 0 );
|
||||
}
|
||||
if( this.schedulingMode != null )
|
||||
{
|
||||
this.schedulingMode.setVisibility(this.bc.getInstalledUpgrades( Upgrades.CAPACITY ) > 0 && this.bc instanceof PartExportBus );
|
||||
}
|
||||
}
|
||||
|
||||
protected String getBackground()
|
||||
@@ -178,5 +192,10 @@ public class GuiUpgradeable extends AEBaseGui
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.fuzzyMode.getSetting(), backwards ) );
|
||||
}
|
||||
|
||||
if( btn == this.schedulingMode )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketConfigButton( this.schedulingMode.getSetting(), backwards ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ import appeng.api.config.OperationMode;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.RelativeDirection;
|
||||
import appeng.api.config.SchedulingMode;
|
||||
import appeng.api.config.SearchBoxMode;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.SortDir;
|
||||
@@ -158,6 +159,10 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
|
||||
this.registerApp( 16 * 14, Settings.PLACE_BLOCK, YesNo.YES, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementYes );
|
||||
this.registerApp( 16 * 14 + 1, Settings.PLACE_BLOCK, YesNo.NO, ButtonToolTips.BlockPlacement, ButtonToolTips.BlockPlacementNo );
|
||||
|
||||
this.registerApp( 16 * 15, Settings.SCHEDULING_MODE, SchedulingMode.DEFAULT, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeDefault );
|
||||
this.registerApp( 16 * 15 + 1, Settings.SCHEDULING_MODE, SchedulingMode.ROUNDROBIN, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRoundRobin );
|
||||
this.registerApp( 16 * 15 + 2, Settings.SCHEDULING_MODE, SchedulingMode.RANDOM, ButtonToolTips.SchedulingMode, ButtonToolTips.SchedulingModeRandom );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -389,7 +394,6 @@ public class GuiImgButton extends GuiButton implements ITooltip
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class ButtonAppearance
|
||||
{
|
||||
public int index;
|
||||
|
||||
@@ -56,11 +56,11 @@ public class GuiTabButton extends GuiButton implements ITooltip
|
||||
/**
|
||||
* Using itemstack as an icon
|
||||
*
|
||||
* @param x x pos of button
|
||||
* @param y y pos of button
|
||||
* @param ico used icon
|
||||
* @param x x pos of button
|
||||
* @param y y pos of button
|
||||
* @param ico used icon
|
||||
* @param message mouse over message
|
||||
* @param ir renderer
|
||||
* @param ir renderer
|
||||
*/
|
||||
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.
|
||||
*
|
||||
* @param fontRenderer renderer for the strings
|
||||
* @param xPos absolute left position
|
||||
* @param yPos absolute top position
|
||||
* @param width absolute width
|
||||
* @param height absolute height
|
||||
* @param xPos absolute left position
|
||||
* @param yPos absolute top position
|
||||
* @param width absolute width
|
||||
* @param height absolute height
|
||||
*/
|
||||
public MEGuiTextField( FontRenderer fontRenderer, int xPos, int yPos, int width, int height )
|
||||
{
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.client.render;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Function;
|
||||
|
||||
@@ -24,7 +24,6 @@ import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.block.networking.BlockController;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@@ -29,7 +29,6 @@ import net.minecraft.world.IBlockAccess;
|
||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.block.misc.BlockPaint;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.client.texture.ExtraBlockTextures;
|
||||
|
||||
@@ -32,7 +32,6 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
import appeng.api.util.IOrientable;
|
||||
import appeng.api.util.IOrientableBlock;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.block.misc.BlockQuartzTorch;
|
||||
import appeng.client.render.BaseBlockRender;
|
||||
import appeng.tile.AEBaseTile;
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
@Override
|
||||
/**
|
||||
* Overridden super.setupConfig to prevent setting up the fake slots
|
||||
*/ protected void setupConfig()
|
||||
*/protected void setupConfig()
|
||||
{
|
||||
this.setupUpgrades();
|
||||
}
|
||||
@@ -127,10 +127,10 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
for( IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||
{
|
||||
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...
|
||||
( 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 )
|
||||
{
|
||||
|
||||
@@ -27,6 +27,7 @@ import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.FuzzyMode;
|
||||
import appeng.api.config.RedstoneMode;
|
||||
import appeng.api.config.SchedulingMode;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.Upgrades;
|
||||
@@ -58,6 +59,8 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
public FuzzyMode fzMode = FuzzyMode.IGNORE_ALL;
|
||||
@GuiSync( 5 )
|
||||
public YesNo cMode = YesNo.NO;
|
||||
@GuiSync( 6 )
|
||||
public SchedulingMode schedulingMode = SchedulingMode.DEFAULT;
|
||||
int tbSlot;
|
||||
NetworkToolViewer tbInventory;
|
||||
|
||||
@@ -217,6 +220,7 @@ public class ContainerUpgradeable extends AEBaseContainer implements IOptionalSl
|
||||
if( this.upgradeable instanceof PartExportBus )
|
||||
{
|
||||
this.cMode = (YesNo) cm.getSetting( Settings.CRAFT_ONLY );
|
||||
this.schedulingMode = (SchedulingMode) cm.getSetting( Settings.SCHEDULING_MODE );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,8 @@ package appeng.container.slot;
|
||||
|
||||
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
|
||||
{
|
||||
|
||||
@@ -145,7 +145,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem)
|
||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ?
|
||||
// ((ICraftingPatternItem)
|
||||
// i.getItem()).getPatternForItem( i ) : null;
|
||||
return false;// pattern != null;
|
||||
}
|
||||
@@ -179,8 +180,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
|
||||
case INSCRIBER_INPUT:
|
||||
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;
|
||||
*/
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ public final class Api implements IAppEngApi
|
||||
@Override
|
||||
public IGridNode createGridNode( IGridBlock blk )
|
||||
{
|
||||
if ( Platform.isClient() )
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
throw new IllegalStateException( "Grid features for " + blk + " are server side only." );
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Stopwatch;
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.core;
|
||||
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
@@ -35,6 +36,10 @@ import appeng.core.api.imc.IMCSpatial;
|
||||
|
||||
/**
|
||||
* Handles the delegation of the corresponding IMC messages to the suitable IMC processors
|
||||
*
|
||||
* @author thatsIch
|
||||
* @version rv3 - 10.08.2015
|
||||
* @since rv1
|
||||
*/
|
||||
public class IMCHandler
|
||||
{
|
||||
@@ -43,8 +48,7 @@ public class IMCHandler
|
||||
/**
|
||||
* Contains the processors,
|
||||
*
|
||||
* is mutable,
|
||||
* but write access only by the constructor
|
||||
* is mutable, but write access only by the constructor
|
||||
*/
|
||||
private final Map<String, IIMCProcessor> processors;
|
||||
|
||||
@@ -62,13 +66,12 @@ public class IMCHandler
|
||||
|
||||
for( TunnelType type : TunnelType.values() )
|
||||
{
|
||||
this.processors.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase(), new IMCP2PAttunement() );
|
||||
this.processors.put( "add-p2p-attunement-" + type.name().replace( '_', '-' ).toLowerCase( Locale.ENGLISH ), new IMCP2PAttunement() );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Tries to find every message matching the internal IMC keys.
|
||||
* When found the corresponding handler will process the attached message.
|
||||
* Tries to find every message matching the internal IMC keys. When found the corresponding handler will process the attached message.
|
||||
*
|
||||
* @param event Event carrying the identifier and message for the handlers
|
||||
*/
|
||||
@@ -80,7 +83,7 @@ public class IMCHandler
|
||||
|
||||
try
|
||||
{
|
||||
IIMCProcessor handler = this.processors.get( key );
|
||||
final IIMCProcessor handler = this.processors.get( key );
|
||||
if( handler != null )
|
||||
{
|
||||
handler.process( message );
|
||||
@@ -90,7 +93,7 @@ public class IMCHandler
|
||||
throw new IllegalStateException( "Invalid IMC Called: " + key );
|
||||
}
|
||||
}
|
||||
catch( Throwable t )
|
||||
catch( Exception t )
|
||||
{
|
||||
AELog.warning( "Problem detected when processing IMC " + key + " from " + message.getSender() );
|
||||
AELog.error( t );
|
||||
|
||||
@@ -69,11 +69,11 @@ public class RecipeLoader implements Runnable
|
||||
final File readmeGenDest = new File( generatedRecipesDir, "README.html" );
|
||||
final File readmeUserDest = new File( userRecipesDir, "README.html" );
|
||||
|
||||
final IRecipeLoader oreDictLoader = new JarLoader("/assets/appliedenergistics2/oredict/");
|
||||
this.handler.parseRecipes(oreDictLoader, "vanilla.oredict" );
|
||||
this.handler.parseRecipes(oreDictLoader, "ae2.oredict" );
|
||||
final IRecipeLoader oreDictLoader = new JarLoader( "/assets/appliedenergistics2/oredict/" );
|
||||
this.handler.parseRecipes( oreDictLoader, "vanilla.oredict" );
|
||||
this.handler.parseRecipes( oreDictLoader, "ae2.oredict" );
|
||||
|
||||
// generates generated and user recipes dir
|
||||
// generates generated and user recipes dir
|
||||
// will clean the generated every time to keep it up to date
|
||||
// copies over the recipes in the jar over to the generated folder
|
||||
// copies over the readmes
|
||||
|
||||
@@ -343,10 +343,10 @@ public final class Registration
|
||||
target.partCableCovered = source.cableCovered();
|
||||
target.partCableGlass = source.cableGlass();
|
||||
target.partCableDense = source.cableDense();
|
||||
// target.partLumenCableSmart = source.lumenCableSmart();
|
||||
// target.partLumenCableCovered = source.lumenCableCovered();
|
||||
// target.partLumenCableGlass = source.lumenCableGlass();
|
||||
// target.partLumenCableDense = source.lumenCableDense();
|
||||
// target.partLumenCableSmart = source.lumenCableSmart();
|
||||
// target.partLumenCableCovered = source.lumenCableCovered();
|
||||
// target.partLumenCableGlass = source.lumenCableGlass();
|
||||
// target.partLumenCableDense = source.lumenCableDense();
|
||||
target.partQuartzFiber = this.converter.of( source.quartzFiber() );
|
||||
target.partToggleBus = this.converter.of( source.toggleBus() );
|
||||
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" );
|
||||
}
|
||||
|
||||
if ( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.OpenComputers ) )
|
||||
{
|
||||
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.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.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.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.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.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.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.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.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.itemGen = constructor.registerBlockDefinition( new BlockItemGen() );
|
||||
this.chunkLoader = constructor.registerBlockDefinition( new BlockChunkloader() );
|
||||
|
||||
@@ -61,6 +61,7 @@ public final class ApiParts implements IParts
|
||||
private final IItemDefinition p2PTunnelRF;
|
||||
private final IItemDefinition p2PTunnelLight;
|
||||
private final IItemDefinition p2PTunnelOpenComputers;
|
||||
private final IItemDefinition p2PTunnelPneumaticCraft;
|
||||
private final IItemDefinition cableAnchor;
|
||||
private final IItemDefinition monitor;
|
||||
private final IItemDefinition semiDarkMonitor;
|
||||
@@ -104,6 +105,7 @@ public final class ApiParts implements IParts
|
||||
this.p2PTunnelRF = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelRF ) );
|
||||
this.p2PTunnelLight = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelLight ) );
|
||||
this.p2PTunnelOpenComputers = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelOpenComputers ) );
|
||||
this.p2PTunnelPneumaticCraft = new DamagedItemDefinition( itemMultiPart.createPart( PartType.P2PTunnelPressure ) );
|
||||
this.cableAnchor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.CableAnchor ) );
|
||||
this.monitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.Monitor ) );
|
||||
this.semiDarkMonitor = new DamagedItemDefinition( itemMultiPart.createPart( PartType.SemiDarkMonitor ) );
|
||||
@@ -282,6 +284,12 @@ public final class ApiParts implements IParts
|
||||
return this.p2PTunnelOpenComputers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition p2PTunnelPneumaticCraft()
|
||||
{
|
||||
return this.p2PTunnelPneumaticCraft;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemDefinition cableAnchor()
|
||||
{
|
||||
|
||||
@@ -54,7 +54,7 @@ public class DefinitionConstructor
|
||||
|
||||
if( definition instanceof ITileDefinition )
|
||||
{
|
||||
return ( (ITileDefinition) definition );
|
||||
return( (ITileDefinition) definition );
|
||||
}
|
||||
|
||||
throw new IllegalStateException( "No tile definition for " + feature );
|
||||
@@ -66,7 +66,7 @@ public class DefinitionConstructor
|
||||
|
||||
if( definition instanceof IBlockDefinition )
|
||||
{
|
||||
return ( (IBlockDefinition) definition );
|
||||
return( (IBlockDefinition) definition );
|
||||
}
|
||||
|
||||
throw new IllegalStateException( "No block definition for " + feature );
|
||||
|
||||
@@ -18,35 +18,35 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setInteger( "turns", 8 );
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setInteger( "turns", 8 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
|
||||
-- or --
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound optional = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound in = new NBTTagCompound();
|
||||
NBTTagCompound out = new NBTTagCompound();
|
||||
NBTTagCompound optional = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setTag( "optional", optional );
|
||||
msg.setFloat( "chance", 0.5 );
|
||||
msg.setInteger( "turns", 8 );
|
||||
new ItemStack( Blocks.iron_ore ).writeToNBT( in );
|
||||
new ItemStack( Items.iron_ingot ).writeToNBT( out );
|
||||
new ItemStack( Blocks.gravel ).writeToNBT( optional );
|
||||
msg.setTag( "in", in );
|
||||
msg.setTag( "out", out );
|
||||
msg.setTag( "optional", optional );
|
||||
msg.setFloat( "chance", 0.5 );
|
||||
msg.setInteger( "turns", 8 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-grindable", msg );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound item = new NBTTagCompound();
|
||||
NBTTagCompound msg = new NBTTagCompound();
|
||||
NBTTagCompound item = new NBTTagCompound();
|
||||
|
||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||
msg.setTag( "item", item );
|
||||
msg.setDouble( "weight", 32.0 );
|
||||
new ItemStack( Blocks.anvil ).writeToNBT( item );
|
||||
msg.setTag( "item", item );
|
||||
msg.setDouble( "weight", 32.0 );
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-mattercannon-ammo", msg );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -18,12 +18,12 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-me", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-bc-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-ic2-power", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-redstone", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-fluid", new ItemStack( myBlockOrItem ) );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "add-p2p-attunement-item", new ItemStack( myBlockOrItem ) );
|
||||
|
||||
*/
|
||||
|
||||
@@ -31,6 +31,7 @@ package appeng.core.api.imc;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Locale;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
@@ -47,7 +48,7 @@ public class IMCP2PAttunement implements IIMCProcessor
|
||||
@Override
|
||||
public void process( IMCMessage m )
|
||||
{
|
||||
String key = m.key.substring( "add-p2p-attunement-".length() ).replace( '-', '_' ).toUpperCase();
|
||||
String key = m.key.substring( "add-p2p-attunement-".length() ).replace( '-', '_' ).toUpperCase( Locale.ENGLISH );
|
||||
|
||||
TunnelType type = TunnelType.valueOf( key );
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
/* Example:
|
||||
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||
FMLInterModComms.sendMessage( "appliedenergistics2", "whitelist-spatial", "mymod.tileentities.MyTileEntity" );
|
||||
|
||||
*/
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.crash;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.crash;
|
||||
|
||||
|
||||
@@ -7,7 +8,7 @@ import appeng.core.AEConfig;
|
||||
public class ModCrashEnhancement extends BaseCrashEnhancement
|
||||
{
|
||||
private static final String MOD_VERSION = AEConfig.CHANNEL + ' ' + AEConfig.VERSION + " for Forge " + // WHAT?
|
||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
net.minecraftforge.common.ForgeVersion.majorVersion + '.' // majorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.minorVersion + '.' // minorVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.revisionVersion + '.' // revisionVersion
|
||||
+ net.minecraftforge.common.ForgeVersion.buildVersion;
|
||||
|
||||
@@ -27,9 +27,7 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.core.CommonHelper;
|
||||
import appeng.core.CreativeTab;
|
||||
import appeng.util.Platform;
|
||||
|
||||
|
||||
public final class AEBlockFeatureHandler implements IFeatureHandler
|
||||
|
||||
@@ -57,7 +57,7 @@ public enum AEFeature
|
||||
|
||||
DenseEnergyCells( "HigherCapacity" ), DenseCables( "HigherCapacity" ),
|
||||
|
||||
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ),
|
||||
P2PTunnelRF( "P2PTunnels" ), P2PTunnelME( "P2PTunnels" ), P2PTunnelItems( "P2PTunnels" ), P2PTunnelRedstone( "P2PTunnels" ), P2PTunnelEU( "P2PTunnels" ), P2PTunnelLiquids( "P2PTunnels" ), P2PTunnelLight( "P2PTunnels" ), P2PTunnelOpenComputers( "P2PTunnels" ), P2PTunnelPressure( "P2PTunnels" ),
|
||||
|
||||
MassCannonBlockDamage( "BlockFeatures" ), TinyTNTBlockDamage( "BlockFeatures" ), Facades( "Facades" ),
|
||||
|
||||
@@ -79,7 +79,7 @@ public enum AEFeature
|
||||
|
||||
AEFeature( String cat )
|
||||
{
|
||||
this(cat, true);
|
||||
this( cat, true );
|
||||
}
|
||||
|
||||
AEFeature( String cat, boolean defaultValue )
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features;
|
||||
|
||||
|
||||
@@ -92,7 +93,6 @@ public final class DefinitionConverter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class AEItem extends AEComparable
|
||||
{
|
||||
private final IItemDefinition definition;
|
||||
@@ -119,7 +119,6 @@ public final class DefinitionConverter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class AEBlock extends AEItem
|
||||
{
|
||||
private final IBlockDefinition definition;
|
||||
@@ -145,7 +144,6 @@ public final class DefinitionConverter
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static class AETile extends AEBlock
|
||||
{
|
||||
private final ITileDefinition definition;
|
||||
|
||||
@@ -21,17 +21,15 @@ package appeng.core.features;
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockSlab;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import appeng.api.definitions.IBlockDefinition;
|
||||
import appeng.block.AEBaseItemBlockSlab;
|
||||
import appeng.block.AEBaseSlabBlock;
|
||||
import appeng.core.CreativeTab;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
|
||||
public class SlabBlockFeatureHandler implements IFeatureHandler
|
||||
{
|
||||
@@ -44,7 +42,7 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
||||
{
|
||||
final ActivityState state = new FeaturedActiveChecker( features ).getActivityState();
|
||||
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.definition = new BlockDefinition( slabs, state );
|
||||
}
|
||||
@@ -67,8 +65,8 @@ public class SlabBlockFeatureHandler implements IFeatureHandler
|
||||
if( this.enabled )
|
||||
{
|
||||
this.slabs.setCreativeTab( CreativeTab.instance );
|
||||
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( this.slabs, AEBaseItemBlockSlab.class, "tile." + this.slabs.name(), this.slabs, this.slabs.doubleSlabs(), false );
|
||||
GameRegistry.registerBlock( this.slabs.doubleSlabs(), AEBaseItemBlockSlab.class, "tile." + this.slabs.name() + ".double", this.slabs, this.slabs.doubleSlabs(), true );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core.features.registries;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.init.Blocks;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
* Copyright (c) 2013 - 2015, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -19,8 +19,12 @@
|
||||
package appeng.core.features.registries;
|
||||
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.api.features.IRecipeHandlerRegistry;
|
||||
import appeng.api.recipes.ICraftHandler;
|
||||
@@ -30,16 +34,21 @@ import appeng.core.AELog;
|
||||
import appeng.recipes.RecipeHandler;
|
||||
|
||||
|
||||
/**
|
||||
* @author AlgorithmX2
|
||||
* @author thatsIch
|
||||
* @version rv3 - 10.08.2015
|
||||
* @since rv0
|
||||
*/
|
||||
public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
{
|
||||
|
||||
final HashMap<String, Class<? extends ICraftHandler>> handlers = new HashMap<String, Class<? extends ICraftHandler>>();
|
||||
final LinkedList<ISubItemResolver> resolvers = new LinkedList<ISubItemResolver>();
|
||||
private final Map<String, Class<? extends ICraftHandler>> handlers = new HashMap<String, Class<? extends ICraftHandler>>( 20 );
|
||||
private final Collection<ISubItemResolver> resolvers = new LinkedList<ISubItemResolver>();
|
||||
|
||||
@Override
|
||||
public void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler )
|
||||
{
|
||||
this.handlers.put( name.toLowerCase(), handler );
|
||||
this.handlers.put( name.toLowerCase( Locale.ENGLISH ), handler );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -48,6 +57,7 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
this.resolvers.add( sir );
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public ICraftHandler getCraftHandlerFor( String name )
|
||||
{
|
||||
@@ -64,7 +74,9 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
{
|
||||
AELog.severe( "Error Caused when trying to construct " + clz.getName() );
|
||||
AELog.error( e );
|
||||
|
||||
this.handlers.put( name, null ); // clear it..
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -75,6 +87,7 @@ public class RecipeHandlerRegistry implements IRecipeHandlerRegistry
|
||||
return new RecipeHandler();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Object resolveItem( String nameSpace, String itemName )
|
||||
{
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features.registries.entries;
|
||||
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.core.features.registries.entries;
|
||||
|
||||
|
||||
@@ -94,7 +95,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||
{
|
||||
return true;
|
||||
}
|
||||
if( !(o instanceof IInscriberRecipe) )
|
||||
if( !( o instanceof IInscriberRecipe ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -113,7 +114,7 @@ public class InscriberRecipe implements IInscriberRecipe
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if( !this.maybeBot.equals( that.getBottomOptional()) )
|
||||
if( !this.maybeBot.equals( that.getBottomOptional() ) )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -61,7 +61,9 @@ public enum ButtonToolTips
|
||||
BlockPlacement, BlockPlacementYes, BlockPlacementNo,
|
||||
|
||||
// Used in the tooltips of the items in the terminal, when moused over
|
||||
ItemsStored, ItemsRequestable;
|
||||
ItemsStored, ItemsRequestable,
|
||||
|
||||
SchedulingMode, SchedulingModeDefault, SchedulingModeRoundRobin, SchedulingModeRandom;
|
||||
|
||||
final String root;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public enum GuiText
|
||||
CraftingTerminal, FormationPlane, Inscriber, QuartzCuttingKnife,
|
||||
|
||||
// tunnel names
|
||||
METunnel, ItemTunnel, RedstoneTunnel, EUTunnel, FluidTunnel, OCTunnel, LightTunnel, RFTunnel,
|
||||
METunnel, ItemTunnel, RedstoneTunnel, EUTunnel, FluidTunnel, OCTunnel, LightTunnel, RFTunnel, PressureTunnel,
|
||||
|
||||
StoredSize, CopyMode, CopyModeDesc, PatternTerminal, CraftingPattern,
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ public enum PlayerMessages
|
||||
isNowLocked, isNowUnlocked,
|
||||
AmmoDepleted,
|
||||
CommunicationError, OutOfRange, DeviceNotPowered, DeviceNotWirelessTerminal, DeviceNotLinked, StationCanNotBeLocated,
|
||||
SettingCleared,;
|
||||
SettingCleared, ;
|
||||
|
||||
public IChatComponent get()
|
||||
{
|
||||
|
||||
@@ -47,7 +47,9 @@ public enum TickRates
|
||||
|
||||
LightTunnel( 5, 120 ),
|
||||
|
||||
OpenComputersTunnel( 1, 5 );
|
||||
OpenComputersTunnel( 1, 5 ),
|
||||
|
||||
PressureTunnel( 1, 120 );
|
||||
|
||||
public int min;
|
||||
public int max;
|
||||
|
||||
@@ -38,20 +38,24 @@ import appeng.core.features.AEFeature;
|
||||
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;
|
||||
|
||||
/**
|
||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the {@param config}
|
||||
* is true if the {@link appeng.core.features.AEFeature#Achievements} is enabled in the
|
||||
*
|
||||
* @param config}
|
||||
*/
|
||||
private final boolean isAchievementFeatureEnabled;
|
||||
|
||||
/**
|
||||
* Constructs this with an {@link cpw.mods.fml.common.eventhandler.EventBus} and {@link appeng.core.AEConfig}.
|
||||
*
|
||||
* @param bus {@see #bus}
|
||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||
* @param bus {@see #bus}
|
||||
* @param config {@link appeng.core.AEConfig} which is used to determine if the
|
||||
* {@link appeng.core.features.AEFeature#Achievements} is enabled
|
||||
*/
|
||||
public PlayerStatsRegistration( 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()
|
||||
{
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
@@ -56,7 +56,6 @@ public class AppEngPacketHandlerBase
|
||||
{
|
||||
private static final Map<Class<? extends AppEngPacket>, PacketTypes> REVERSE_LOOKUP = new HashMap<Class<? extends AppEngPacket>, AppEngPacketHandlerBase.PacketTypes>();
|
||||
|
||||
|
||||
public enum PacketTypes
|
||||
{
|
||||
PACKET_COMPASS_REQUEST( PacketCompassRequest.class ),
|
||||
|
||||
@@ -101,7 +101,6 @@ import appeng.parts.automation.PartLevelEmitter;
|
||||
import appeng.parts.misc.PartStorageBus;
|
||||
import appeng.parts.reporting.PartCraftingTerminal;
|
||||
import appeng.parts.reporting.PartInterfaceTerminal;
|
||||
import appeng.parts.reporting.PartPanel;
|
||||
import appeng.parts.reporting.PartPatternTerminal;
|
||||
import appeng.tile.crafting.TileCraftingTile;
|
||||
import appeng.tile.crafting.TileMolecularAssembler;
|
||||
|
||||
@@ -67,7 +67,7 @@ public final class PacketConfigButton extends AppEngPacket
|
||||
public void serverPacketData( INetworkInfo manager, AppEngPacket packet, EntityPlayer player )
|
||||
{
|
||||
EntityPlayerMP sender = (EntityPlayerMP) player;
|
||||
if ( sender.openContainer instanceof AEBaseContainer )
|
||||
if( sender.openContainer instanceof AEBaseContainer )
|
||||
{
|
||||
final AEBaseContainer baseContainer = (AEBaseContainer) sender.openContainer;
|
||||
if( baseContainer.getTarget() instanceof IConfigurableObject )
|
||||
|
||||
@@ -219,7 +219,7 @@ public class PacketNEIRecipe extends AppEngPacket
|
||||
// If that doesn't work, grab from the player's inventory
|
||||
if( whichItem == null && playerInventory != null )
|
||||
{
|
||||
whichItem = extractItemFromPlayerInventory( player, realForFake, patternItem );
|
||||
whichItem = this.extractItemFromPlayerInventory( player, realForFake, patternItem );
|
||||
}
|
||||
|
||||
craftMatrix.setInventorySlotContents( x, whichItem );
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.core.worlddata;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core.worlddata;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.core.worlddata;
|
||||
|
||||
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
@@ -47,7 +48,7 @@ public interface IWorldPlayerMapping
|
||||
/**
|
||||
* Put in new players when they join the server
|
||||
*
|
||||
* @param id id of new player
|
||||
* @param id id of new player
|
||||
* @param uuid UUID of new player
|
||||
*/
|
||||
void put( int id, @Nonnull UUID uuid );
|
||||
|
||||
@@ -65,10 +65,11 @@ public class MeteorDataNameEncoder
|
||||
|
||||
/**
|
||||
* @param dimension ID of the processed dimension. Can be any integer
|
||||
* @param chunkX X coordinate of the chunk. Can be any integer
|
||||
* @param chunkZ Z coordinate of the chunk. Can be any integer
|
||||
* @param chunkX X coordinate of the chunk. Can be any integer
|
||||
* @param chunkZ Z coordinate of the chunk. Can be any integer
|
||||
*
|
||||
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be shifted to stay conform with the vanilla chunk system
|
||||
* @return encoded file name suggestion in form of <tt>dim_x_y.dat</tt> where <tt>x</tt> and <tt>y</tt> will be
|
||||
* shifted to stay conform with the vanilla chunk system
|
||||
*
|
||||
* @since rv3 05.06.2015
|
||||
*/
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core.worlddata;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.core.worlddata;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
@@ -51,7 +51,7 @@ class PlayerMappingsInitializer
|
||||
* where the UUIDs were introduced.
|
||||
*
|
||||
* @param playerList the category for the player list, generally extracted using the "players" tag
|
||||
* @param log the logger used to warn the server or user of faulty entries
|
||||
* @param log the logger used to warn the server or user of faulty entries
|
||||
*/
|
||||
PlayerMappingsInitializer( ConfigCategory playerList, FMLRelaunchLog log )
|
||||
{
|
||||
|
||||
@@ -25,6 +25,7 @@ import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import com.google.common.base.Preconditions;
|
||||
@@ -56,7 +57,8 @@ final class SpawnData implements IWorldSpawnData
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setGenerated( int dim, int chunkX, int chunkZ ) {
|
||||
public void setGenerated( int dim, int chunkX, int chunkZ )
|
||||
{
|
||||
synchronized( SpawnData.class )
|
||||
{
|
||||
NBTTagCompound data = this.loadSpawnData( dim, chunkX, chunkZ );
|
||||
|
||||
@@ -23,6 +23,7 @@ import java.io.File;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Map;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ package appeng.core.worlddata;
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ThreadFactory;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ package appeng.facade;
|
||||
|
||||
|
||||
import java.util.EnumSet;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -535,23 +536,18 @@ public class FacadePart implements IFacadePart, IBoxProvider
|
||||
* 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 ( 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 ( 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 ( 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 ( 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 ( out.contains( ForgeDirection.WEST ) && (side.offsetY != 0) ) { IFacadePart fp = fc.getFacade(
|
||||
* ForgeDirection.WEST ); if ( fp != null && (fp.isTransparent() == facade.isTransparent()) ) out.remove(
|
||||
* ForgeDirection.WEST ); }
|
||||
|
||||
@@ -453,7 +453,7 @@ public class CableBusPart extends JCuboidPart implements JNormalOcclusion, IMask
|
||||
double r = Math.abs( a - 0.5 );
|
||||
r = Math.max( Math.abs( b - 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
|
||||
|
||||
@@ -373,7 +373,6 @@ public class PatternHelper implements ICraftingPatternDetails, Comparable<Patter
|
||||
ACCEPT, DECLINE, TEST
|
||||
}
|
||||
|
||||
|
||||
static class TestLookup
|
||||
{
|
||||
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
|
||||
package appeng.helpers;
|
||||
|
||||
|
||||
|
||||
@@ -317,7 +317,6 @@ public class TickHandler
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class PlayerColor
|
||||
{
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.integration;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedList;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import cpw.mods.fml.relauncher.FMLLaunchHandler;
|
||||
|
||||
@@ -29,9 +29,9 @@ public enum IntegrationType
|
||||
|
||||
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" ),
|
||||
|
||||
@@ -63,7 +63,9 @@ public enum IntegrationType
|
||||
|
||||
BetterStorage( IntegrationSide.BOTH, "BetterStorage", "betterstorage" ),
|
||||
|
||||
OpenComputers( IntegrationSide.BOTH, "OpenComputers", "OpenComputers" );
|
||||
OpenComputers( IntegrationSide.BOTH, "OpenComputers", "OpenComputers" ),
|
||||
|
||||
PneumaticCraft( IntegrationSide.BOTH, "PneumaticCraft", "PneumaticCraft" );
|
||||
|
||||
public final IntegrationSide side;
|
||||
public final String dspName;
|
||||
|
||||
@@ -90,7 +90,7 @@ public interface IBuildCraftTransport
|
||||
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}
|
||||
*
|
||||
* @return {@code true} if {@code te} is a buildcraft pipe, but not plugged
|
||||
|
||||
@@ -37,7 +37,7 @@ public class BCPipeHandler implements IExternalStorageHandler
|
||||
@Override
|
||||
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 );
|
||||
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.integration.modules;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
@@ -196,7 +196,7 @@ public class NEIGrinderRecipeHandler extends TemplateRecipeHandler
|
||||
|
||||
if( recipe.getOptionalOutput() != null )
|
||||
{
|
||||
final int chancePercent = (int) (recipe.getOptionalChance() * 100);
|
||||
final int chancePercent = (int) ( recipe.getOptionalChance() * 100 );
|
||||
|
||||
this.hasOptional = true;
|
||||
this.displayChance = String.format( GuiText.OfSecondOutput.getLocal(), chancePercent );
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.integration.modules;
|
||||
|
||||
|
||||
import li.cil.oc.api.Items;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
@@ -25,6 +26,7 @@ import appeng.api.config.TunnelType;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.integration.BaseModule;
|
||||
|
||||
|
||||
public class OpenComputers extends BaseModule
|
||||
{
|
||||
public static OpenComputers instance;
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.integration.modules;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraftforge.oredict.OreDictionary;
|
||||
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.IAppEngApi;
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.api.parts.IPartHelper;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.BaseModule;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
|
||||
|
||||
public class PneumaticCraft extends BaseModule
|
||||
{
|
||||
@Reflected
|
||||
public static PneumaticCraft instance;
|
||||
|
||||
private static final String PNEUMATIC_CRAFT_MOD_ID = "PneumaticCraft";
|
||||
|
||||
@Reflected
|
||||
public PneumaticCraft()
|
||||
{
|
||||
this.testClassExistence( pneumaticCraft.api.block.BlockSupplier.class );
|
||||
this.testClassExistence( pneumaticCraft.api.tileentity.ISidedPneumaticMachine.class );
|
||||
this.testClassExistence( pneumaticCraft.api.tileentity.AirHandlerSupplier.class );
|
||||
this.testClassExistence( pneumaticCraft.api.tileentity.IAirHandler.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init()
|
||||
{
|
||||
final IAppEngApi api = AEApi.instance();
|
||||
final IPartHelper partHelper = api.partHelper();
|
||||
|
||||
if( IntegrationRegistry.INSTANCE.isEnabled( IntegrationType.PneumaticCraft ) )
|
||||
{
|
||||
partHelper.registerNewLayer( appeng.parts.layers.LayerPressure.class.getName(), pneumaticCraft.api.tileentity.ISidedPneumaticMachine.class.getName() );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit()
|
||||
{
|
||||
this.registerPressureAttunement( "pressureTube" );
|
||||
this.registerPressureAttunement( "advancedPressureTube" );
|
||||
}
|
||||
|
||||
private void registerPressureAttunement( String itemID )
|
||||
{
|
||||
final IP2PTunnelRegistry registry = AEApi.instance().registries().p2pTunnel();
|
||||
final ItemStack modItem = GameRegistry.findItemStack( PNEUMATIC_CRAFT_MOD_ID, itemID, 1 );
|
||||
|
||||
if( modItem != null )
|
||||
{
|
||||
modItem.setItemDamage( OreDictionary.WILDCARD_VALUE );
|
||||
registry.addNewAttunement( modItem, TunnelType.PRESSURE );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -54,8 +54,8 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
||||
/**
|
||||
* Used cache for channels if the channel was not transmitted through the server.
|
||||
* <p/>
|
||||
* This is useful, when a player just started to look at a tile
|
||||
* and thus just requested the new information from the server.
|
||||
* This is useful, when a player just started to look at a tile and thus just requested the new information from the
|
||||
* server.
|
||||
* <p/>
|
||||
* 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
|
||||
*
|
||||
* @param part being looked at part
|
||||
* @param part being looked at part
|
||||
* @param currentToolTip current tool tip
|
||||
* @param accessor wrapper for various world information
|
||||
* @param config config to react to various settings
|
||||
* @param accessor wrapper for various world information
|
||||
* @param config config to react to various settings
|
||||
*
|
||||
* @return modified tool tip
|
||||
*/
|
||||
@@ -91,12 +91,11 @@ public final class ChannelWailaDataProvider extends BasePartWailaDataProvider
|
||||
/**
|
||||
* Determines the source of the channel.
|
||||
* <p/>
|
||||
* If the client received information of the channels on the server, they are used,
|
||||
* else if the cache contains a previous stored value, this will be used.
|
||||
* Default value is 0.
|
||||
* If the client received information of the channels on the server, they are used, else if the cache contains a
|
||||
* previous stored value, this will be used. Default value is 0.
|
||||
*
|
||||
* @param part part to be looked at
|
||||
* @param tag tag maybe containing the channel information
|
||||
* @param part part to be looked at
|
||||
* @param tag tag maybe containing the channel information
|
||||
* @param cache cache with previous knowledge
|
||||
*
|
||||
* @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.
|
||||
* <p/>
|
||||
* If the part is a cable,
|
||||
* it writes the channel information in the {@code #tag}
|
||||
* using the {@code ID_USED_CHANNELS} key.
|
||||
* If the part is a cable, it writes the channel information in the {@code #tag} using the {@code ID_USED_CHANNELS}
|
||||
* key.
|
||||
*
|
||||
* @param player player looking at the part
|
||||
* @param part part being looked at
|
||||
* @param te host of the part
|
||||
* @param tag transferred tag which is send to the client
|
||||
* @param world world of the part
|
||||
* @param x x pos of the part
|
||||
* @param y y pos of the part
|
||||
* @param z z pos of the part
|
||||
* @param part part being looked at
|
||||
* @param te host of the part
|
||||
* @param tag transferred tag which is send to the client
|
||||
* @param world world of the part
|
||||
* @param x x pos of the part
|
||||
* @param y y pos of the part
|
||||
* @param z z pos of the part
|
||||
*
|
||||
* @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
|
||||
* @version rv2
|
||||
|
||||
@@ -42,10 +42,10 @@ public final class PartAccessor
|
||||
/**
|
||||
* Hits a {@link appeng.api.parts.IPartHost} with {@link net.minecraft.util.MovingObjectPosition}.
|
||||
* <p/>
|
||||
* You can derive the looked at {@link appeng.api.parts.IPart} by doing that.
|
||||
* If a facade is being looked at, it is defined as being absent.
|
||||
* You can derive the looked at {@link appeng.api.parts.IPart} by doing that. If a facade is being looked at, it is
|
||||
* 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
|
||||
*
|
||||
* @return maybe the looked at {@link appeng.api.parts.IPart}
|
||||
|
||||
+10
-5
@@ -18,19 +18,24 @@
|
||||
|
||||
package appeng.integration.modules.waila.part;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.PartItemStack;
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import mcp.mobius.waila.api.IWailaConfigHandler;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.PartItemStack;
|
||||
|
||||
|
||||
/**
|
||||
* Part ItemStack provider for WAILA
|
||||
* Part ItemStack provider for WAILA
|
||||
*
|
||||
* @author TheJulianJES
|
||||
* @version rv2
|
||||
* @since rv2
|
||||
*/
|
||||
public class PartStackWailaDataProvider extends BasePartWailaDataProvider {
|
||||
public class PartStackWailaDataProvider extends BasePartWailaDataProvider
|
||||
{
|
||||
|
||||
@Override
|
||||
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
|
||||
*
|
||||
* @param part part with state
|
||||
* @param part part with state
|
||||
* @param currentToolTip to be added to tooltip
|
||||
* @param accessor wrapper for various information
|
||||
* @param config config settings
|
||||
* @param accessor wrapper for various information
|
||||
* @param config config settings
|
||||
*
|
||||
* @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}
|
||||
*
|
||||
* @param isActive if part is active
|
||||
* @param isActive if part is active
|
||||
* @param isPowered if part is powered
|
||||
*
|
||||
* @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.
|
||||
* Can handle fluids and items.
|
||||
*
|
||||
* @param part maybe storage monitor
|
||||
* @param part maybe storage monitor
|
||||
* @param currentToolTip to be written to tooltip
|
||||
* @param accessor information wrapper
|
||||
* @param config config option
|
||||
* @param accessor information wrapper
|
||||
* @param config config option
|
||||
*
|
||||
* @return modified tooltip
|
||||
*/
|
||||
|
||||
@@ -40,11 +40,11 @@ public final class Tracer
|
||||
* Trace view of players to blocks.
|
||||
* Ignore all which are out of reach.
|
||||
*
|
||||
* @param world word of block
|
||||
* @param world word of block
|
||||
* @param player player viewing block
|
||||
* @param x x pos of block
|
||||
* @param y y pos of block
|
||||
* @param z z pos of block
|
||||
* @param x x pos of block
|
||||
* @param y y pos of block
|
||||
* @param z z pos of block
|
||||
*
|
||||
* @return trace movement. Can be null
|
||||
*/
|
||||
@@ -72,7 +72,7 @@ public final class Tracer
|
||||
Vec3 v = Vec3.createVectorHelper( player.posX, player.posY, player.posZ );
|
||||
if( player.worldObj.isRemote )
|
||||
{
|
||||
//compatibility with eye height changing mods
|
||||
// compatibility with eye height changing mods
|
||||
v.yCoord += player.getEyeHeight() - player.getDefaultEyeHeight();
|
||||
}
|
||||
else
|
||||
|
||||
@@ -46,10 +46,10 @@ public final class ChargerWailaDataProvider extends BaseWailaDataProvider
|
||||
/**
|
||||
* Displays the holding item and its tooltip
|
||||
*
|
||||
* @param itemStack stack of charger
|
||||
* @param itemStack stack of charger
|
||||
* @param currentToolTip unmodified tooltip
|
||||
* @param accessor wrapper information
|
||||
* @param config config option
|
||||
* @param accessor wrapper information
|
||||
* @param config config option
|
||||
*
|
||||
* @return modified tooltip
|
||||
*/
|
||||
|
||||
+3
-3
@@ -45,10 +45,10 @@ public final class CraftingMonitorWailaDataProvider extends BaseWailaDataProvide
|
||||
/**
|
||||
* 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 accessor information wrapper
|
||||
* @param config config option
|
||||
* @param accessor information wrapper
|
||||
* @param config config option
|
||||
*
|
||||
* @return modified tooltip
|
||||
*/
|
||||
|
||||
+3
-3
@@ -44,10 +44,10 @@ public final class PowerStateWailaDataProvider extends BaseWailaDataProvider
|
||||
/**
|
||||
* 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 accessor wrapper for various information
|
||||
* @param config config settings
|
||||
* @param accessor wrapper for various information
|
||||
* @param config config settings
|
||||
*
|
||||
* @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.
|
||||
* <p/>
|
||||
* This is useful, when a player just started to look at a tile
|
||||
* and thus just requested the new information from the server.
|
||||
* This is useful, when a player just started to look at a tile and thus just requested the new information from the
|
||||
* server.
|
||||
* <p/>
|
||||
* 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
|
||||
* 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 accessor wrapper for various world information
|
||||
* @param config config to react to various settings
|
||||
* @param accessor wrapper for various world information
|
||||
* @param config config to react to various settings
|
||||
*
|
||||
* @return modified tool tip
|
||||
*/
|
||||
@Override
|
||||
public List<String> getWailaBody( ItemStack itemStack, List<String> currentToolTip, IWailaDataAccessor accessor, IWailaConfigHandler config )
|
||||
{
|
||||
//Removes RF tooltip on WAILA 1.5.9+
|
||||
((ITaggedList<String, String>) currentToolTip).removeEntries("RFEnergyStorage");
|
||||
// Removes RF tooltip on WAILA 1.5.9+
|
||||
( (ITaggedList<String, String>) currentToolTip ).removeEntries( "RFEnergyStorage" );
|
||||
|
||||
final TileEntity te = accessor.getTileEntity();
|
||||
if( te instanceof IAEPowerStorage )
|
||||
@@ -106,17 +106,16 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
||||
/**
|
||||
* Called on server to transfer information from server to client.
|
||||
* <p/>
|
||||
* If the {@link net.minecraft.tileentity.TileEntity} is a {@link appeng.api.networking.energy.IAEPowerStorage},
|
||||
* it writes the power information to the {@code #tag}
|
||||
* using the {@code #ID_CURRENT_POWER} key.
|
||||
* If the {@link net.minecraft.tileentity.TileEntity} is a {@link appeng.api.networking.energy.IAEPowerStorage}, it
|
||||
* writes the power information to the {@code #tag} using the {@code #ID_CURRENT_POWER} key.
|
||||
*
|
||||
* @param player player looking at the power storage
|
||||
* @param te power storage
|
||||
* @param tag transferred tag which is send to the client
|
||||
* @param world world of the power storage
|
||||
* @param x x pos of the power storage
|
||||
* @param y y pos of the power storage
|
||||
* @param z z pos of the power storage
|
||||
* @param te power storage
|
||||
* @param tag transferred tag which is send to the client
|
||||
* @param world world of the power storage
|
||||
* @param x x pos of the power storage
|
||||
* @param y y pos of the power storage
|
||||
* @param z z pos of the power storage
|
||||
*
|
||||
* @return tag send to the client
|
||||
*/
|
||||
@@ -141,11 +140,10 @@ public final class PowerStorageWailaDataProvider extends BaseWailaDataProvider
|
||||
/**
|
||||
* Determines the current power.
|
||||
* <p/>
|
||||
* If the client received power information on the server, they are used,
|
||||
* else if the cache contains a previous stored value, this will be used.
|
||||
* Default value is 0.
|
||||
* If the client received power information on the server, they are used, else if the cache contains a previous
|
||||
* stored value, this will be used. 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
|
||||
*
|
||||
* @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." );
|
||||
|
||||
boolean enabled = true;
|
||||
|
||||
|
||||
for( AEFeature f : mat.getFeature() )
|
||||
{
|
||||
enabled = enabled && AEConfig.instance.isFeatureEnabled( f );
|
||||
@@ -190,7 +190,6 @@ public final class ItemMultiMaterial extends AEBaseItem implements IStorageCompo
|
||||
mat.markReady();
|
||||
int newMaterialNum = mat.damageValue;
|
||||
|
||||
|
||||
if( this.dmgToMaterial.get( newMaterialNum ) == null )
|
||||
{
|
||||
this.dmgToMaterial.put( newMaterialNum, mat );
|
||||
|
||||
@@ -21,6 +21,7 @@ package appeng.items.misc;
|
||||
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
@@ -49,6 +49,7 @@ import appeng.parts.p2p.PartP2PItems;
|
||||
import appeng.parts.p2p.PartP2PLight;
|
||||
import appeng.parts.p2p.PartP2PLiquids;
|
||||
import appeng.parts.p2p.PartP2POpenComputers;
|
||||
import appeng.parts.p2p.PartP2PPressure;
|
||||
import appeng.parts.p2p.PartP2PRFPower;
|
||||
import appeng.parts.p2p.PartP2PRedstone;
|
||||
import appeng.parts.p2p.PartP2PTunnelME;
|
||||
@@ -159,6 +160,8 @@ public enum PartType
|
||||
|
||||
P2PTunnelOpenComputers( 468, EnumSet.of( AEFeature.P2PTunnel, AEFeature.P2PTunnelOpenComputers ), EnumSet.of( IntegrationType.OpenComputers ), PartP2POpenComputers.class, GuiText.OCTunnel ),
|
||||
|
||||
P2PTunnelPressure( 469, EnumSet.of( AEFeature.P2PTunnel, AEFeature.P2PTunnelPressure ), EnumSet.of( IntegrationType.PneumaticCraft ), PartP2PPressure.class, GuiText.PressureTunnel ),
|
||||
|
||||
InterfaceTerminal( 480, EnumSet.of( AEFeature.InterfaceTerminal ), EnumSet.noneOf( IntegrationType.class ), PartInterfaceTerminal.class );
|
||||
|
||||
public final int baseDamage;
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
package appeng.items.tools.powered.powersink;
|
||||
|
||||
|
||||
/*
|
||||
@Interface(iface = "universalelectricity.core.item.IItemElectric", modid = "IC2")
|
||||
public class UniversalElectricity extends ThermalExpansion implements IItemElectric
|
||||
|
||||
@@ -666,7 +666,7 @@ public class GridNode implements IGridNode, IPathItem
|
||||
|
||||
public int getLastUsedChannels()
|
||||
{
|
||||
return lastUsedChannels;
|
||||
return this.lastUsedChannels;
|
||||
}
|
||||
|
||||
private static class MachineSecurityBreak implements Callable<Void>
|
||||
|
||||
@@ -29,8 +29,8 @@ import appeng.api.networking.IGridNode;
|
||||
/**
|
||||
* Nested iterator for {@link appeng.me.MachineSet}
|
||||
*
|
||||
* Traverses first over the {@link appeng.me.MachineSet}
|
||||
* and then over every containing {@link appeng.api.networking.IGridNode}
|
||||
* Traverses first over the {@link appeng.me.MachineSet} and then over every containing
|
||||
* {@link appeng.api.networking.IGridNode}
|
||||
*/
|
||||
public class GridNodeIterator implements Iterator<IGridNode>
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user