Package universalelectricity.core.block

Examples of universalelectricity.core.block.INetworkProvider


   
    private void networkLogic(TileEntity that)
    {
        if (that instanceof INetworkProvider)
        {
            INetworkProvider thatN = (INetworkProvider) that;
            if (this.getNetwork() != null && thatN.getNetwork() != null)
            {
                this.getNetwork().merge(thatN.getNetwork());
            }
            else if (this.getNetwork() == null && thatN.getNetwork() != null)
            {
                this.setNetwork(thatN.getNetwork());
            }
            else if (this.getNetwork() != null && thatN.getNetwork() == null)
            {
                thatN.setNetwork(this.getNetwork());
            }
        }
       
        if (that instanceof IHiveNetworkMember)
        {
            IHiveNetworkMember thatN = (IHiveNetworkMember) that;
            if (this.getHiveNetwork() != null && thatN.getHiveNetwork() != null)
            {
                this.getHiveNetwork().merge(thatN.getHiveNetwork());
            }
            else if (this.getHiveNetwork() == null && thatN.getHiveNetwork() != null)
            {
                this.setHiveNetwork(thatN.getHiveNetwork(), false);
            }
            else if (this.getHiveNetwork() != null && thatN.getHiveNetwork() == null)
            {
                thatN.setHiveNetwork(this.getHiveNetwork(), false);
            }
        }
    }
View Full Code Here

TOP

Related Classes of universalelectricity.core.block.INetworkProvider

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.