src/main/java/org/cyclops/integrateddynamics/core/helper/PartHelpers.java
public static Pair<EnumFacing, IPartType> readPartTypeFromNBT(@Nullable INetwork network, BlockPos pos, NBTTagCompound partTag) {
        String partTypeName = partTag.getString("__partType");
        IPartType partType = validatePartType(network, partTypeName, PartTypes.REGISTRY.getPartType(partTypeName));
        if(partType != null) {
            EnumFacing side = EnumFacing.byName(partTag.getString("__side"));
            if (side != null) {
                return Pair.of(side, partType);
            } else {
                IntegratedDynamics.clog(Level.WARN, String.format("The part %s at position %s was at an invalid " +
                                "side and removed.",
                        partType.getName(), pos));
            }
        } else {
            IntegratedDynamics.clog(Level.WARN, String.format("The part %s at position %s was unknown and removed.",
                    partTypeName, pos));
        }
        return null;
    }
/**
     * Read a part from nbt.
     * @param network The network the part will be part of.
     * @param pos The position of the part, used for error reporting.
     * @param partTag The tag to read from.
     * @return The part data.
     */
Read a part from nbt.
@param network The network the part will be part of.
@param pos The position of the part, used for error reporting.
@param partTag The tag to read from.
@return The part data.
Read a part from nbt . @param network The network the part will be part of . @param pos The position of the part used for error reporting . @param partTag The tag to read from . @return The part data .
public static Pair<EnumFacing, IPartType> readPartTypeFromNBT(@Nullable INetwork network, BlockPos pos, NBTTagCompound partTag) {
        String partTypeName = partTag.getString("__partType");
        IPartType partType = validatePartType(network, partTypeName, PartTypes.REGISTRY.getPartType(partTypeName));
        if(partType != null) {
            EnumFacing side = EnumFacing.byName(partTag.getString("__side"));
            if (side != null) {
                return Pair.of(side, partType);
            } else {
                IntegratedDynamics.clog(Level.WARN, String.format("The part %s at position %s was at an invalid " +
                                "side and removed.",
                        partType.getName(), pos));
            }
        } else {
            IntegratedDynamics.clog(Level.WARN, String.format("The part %s at position %s was unknown and removed.",
                    partTypeName, pos));
        }
        return null;
    }
public static Pair < EnumFacing , IPartType > readPartTypeFromNBT ( @ Nullable INetwork network , BlockPos pos , NBTTagCompound partTag ) { String partTypeName = partTag . getString ( "__partType" ) ; IPartType partType = validatePartType ( network , partTypeName , PartTypes . REGISTRY . getPartType ( partTypeName ) ) ; if ( partType != null ) { EnumFacing side = EnumFacing . byName ( partTag . getString ( "__side" ) ) ; if ( side != null ) { return Pair . of ( side , partType ) ; } else { IntegratedDynamics . clog ( Level . WARN , String . format ( "The part %s at position %s was at an invalid " + "side and removed." , partType . getName ( ) , pos ) ) ; } } else { IntegratedDynamics . clog ( Level . WARN , String . format ( "The part %s at position %s was unknown and removed." , partTypeName , pos ) ) ; } return null ; }
Read a part from nbt.
Read a part from nbt .